CleverRaven/Cataclysm-DDA — pull request #3345 by ianestrachan (2013-09-29 04:46:46+00:00)
Title: Jsonize furniture and terrain, part 1

This PR (which, it appears, is conflicting with something) moves both terrain and furniture declarations from two huge blocks of static initializers to two JSON files, using the shiny, new and improved JSON loading format. I couldn't JSONize one without doing the other, as they both used the same t_flag enum (which has been replaced with string flags).

The ter_id and furn_id enums are still present and are still used to index into the vectors-that-replace-arrays of terrain/furniture types, so this ~~will~~ should **not** break save compatibility. It also means you still have to add constants to those arrays to add new terrain/furniture types. Removing those will have to wait for another PR.

I made heavy use of find-and-replace to format the JSON properly, probably resulting in the first time in history that the following scenario has occurred: I had a problem, so I used regular expressions, and now I have no problems. Still I would appreciate a few eyeballs checking that I didn't misspell any of the string flags while I was replacing those; I checked myself, but I might have missed some.