Make MapParser.cs more robust for patches and additional map formats #65
Description
I wanted to add Patch support to Qodot 4, but when I had a look at the map parser it didn't seem very robust in design. Basically anything makes it fail that is not formatted correctly or that it does not understand.
For example if it encounters patches, it fails. If it encounters some extension to the Quake 1 format, it fails. There are like a dozen extensions beyond Quake 1 that add stuff to the map format. Not sure how many, but it is extensive.
I was wondering if it was just provisionary thing? Are you working on a total rewrite or would welcome someone to do it?
As the .map format is complicated, I am not sure if I am up to the task. But I could rewrite it with regex, so it reads at least as much as it can without totally failing, and that it simply ignores stuff it doesn't understand.
With Trenchbroom Loader, you could load Quake3 or Xonotic maps if they were previously converted to Valve 220 format in Netradiant Custom. Just the patches were missing. A lot of maps were playable this way, and some didn't even look that much different. Plus you can convert any bsp file with q3map2 to map format, with little to no issues.
I think you only get real value from able to load Radiant maps, if it can actually load existing maps from other games. And there are literally like tens of thousands of maps out there.
So I believe a rewrite and Patch support would be a major priority.