[PATCH] Make RMGen wall placement more generic so no/less tweaking is needed if new civs are added
This patch includes:
- Adding function getCivList() to RMGen lib library.js that works even before civ data are fully loaded (needed for RMGen lib wall_builder.js, used by RMS wall_demo.js)
- Avoiding explicitly naming the civ strings in RMGen lib wall_builder.js and RMS wall_demo.js so no patching is needed for them if a new civ is added. If a mod sticks to the entity template naming syntax ("structures/"+[civ string]+"_"+[building type]) and has all needed wall elements (wall_tower, wall_short, wall_medium, wall_long, wall_gate) the wall builder now will work for all "default" placement methods (there are advanced functions/arguments that still will cause failure in some cases).
- Tweaking RMS wall_demo.js to use the full map width and due to the added civ recommending map size "Giant" for it.
- Spellcheck and explanations: Fixed some explaining in RMGen lib misc.js and some typos in the changed files
Some questions that arose while writing the patch:
- Wouldn't it be better to load the civ data during RMGen import RMS.LoadLibrary("rmgen"); instead of the map objects initialization InitMap(); so RMGen libs can use them? (This would remove the need of getCivList())
- Civ theb is not a full faction AFAIK. This is still explicitly named and avoided (which is bad on it's own). Will this cause problems? Is there a way to avoid the explicit naming?
- Some wall styles (like rome_siege and palisades) are not a civ. I have no idea how to avoid explicit naming in such cases (and patching will be required if further cases like this are added). Is this OK?