Add support for mauryan walls to the rmgen wall builder. Patch by FeXoR. Fixes #1855.

This was SVN commit r13246.
This commit is contained in:
leper 2013-03-08 23:46:36 +00:00
parent 8c756b507a
commit 0572ffd3d2
3 changed files with 5 additions and 4 deletions

View File

@ -108,7 +108,7 @@ function Fortress(type, wall, centerToFirstElement)
var wallStyles = {};
// Generic civ dependent wall style definition. "rome_siege" needs some tweek...
var wallScaleByType = {"athen" : 1.5, "brit" : 1.5, "cart" : 1.8, "celt" : 1.5, "gaul" : 1.5, "hele" : 1.5, "iber" : 1.5, "mace" : 1.5, "pers" : 1.5, "rome" : 1.5, "spart" : 1.5, "rome_siege" : 1.5};
var wallScaleByType = {"athen" : 1.5, "brit" : 1.5, "cart" : 1.8, "celt" : 1.5, "gaul" : 1.5, "hele" : 1.5, "iber" : 1.5, "mace" : 1.5, "maur": 1.5, "pers" : 1.5, "rome" : 1.5, "spart" : 1.5, "rome_siege" : 1.5};
for (var style in wallScaleByType)
{
var civ = style;
@ -159,6 +159,7 @@ wallStyles["gaul"]["wallFort"] = new WallElement("wallFort", "structures/gaul_fo
wallStyles["hele"]["wallFort"] = new WallElement("wallFort", "structures/hele_fortress", 2*PI/2 /* PI/2 */, 5.1 /* 5.6 */, 1.9 /* 1.9 */);
wallStyles["iber"]["wallFort"] = new WallElement("wallFort", "structures/iber_fortress", PI, 5, 0.2);
wallStyles["mace"]["wallFort"] = new WallElement("wallFort", "structures/mace_fortress", 2*PI/2 /* PI/2 */, 5.1 /* 5.6 */, 1.9 /* 1.9 */);
wallStyles["maur"]["wallFort"] = new WallElement("wallFort", "structures/maur_fortress", PI, 5.5);
wallStyles["pers"]["wallFort"] = new WallElement("wallFort", "structures/pers_fortress", PI, 5.6/*5.5*/, 1.9/*1.7*/);
wallStyles["rome"]["wallFort"] = new WallElement("wallFort", "structures/rome_fortress", PI, 6.3, 2.1);
wallStyles["spart"]["wallFort"] = new WallElement("wallFort", "structures/spart_fortress", 2*PI/2 /* PI/2 */, 5.1 /* 5.6 */, 1.9 /* 1.9 */);

View File

@ -57,13 +57,13 @@ const BUILDING_ANlE = -PI/4;
// General wall placement setup
const distToMapBorder = 5;
const distToOtherWalls = 5;
const distToOtherWalls = 10;
var buildableMapSize = mapSize - 2 * distToMapBorder;
var actualX = distToMapBorder;
var actualY = distToMapBorder;
// Wall styles are chosen by strings so the civ strings got by g_MapSettings.PlayerData[playerId - 1].Civ can be used
// Other styles may be present as well but besides the civ styles only 'palisades' includes all wall element types (yet)
const wallStyleList = ["athen", "brit", "cart", "celt", "gaul", "hele", "iber", "mace", "pers", "rome", "spart", "rome_siege", "palisades"];
const wallStyleList = ["athen", "brit", "cart", "celt", "gaul", "hele", "iber", "mace", "maur", "pers", "rome", "spart", "rome_siege", "palisades"];
////////////////////////////////////////

View File

@ -2,7 +2,7 @@
"settings" : {
"Name" : "Wall Demo",
"Script" : "wall_demo.js",
"Description" : "A demonstration of wall placement methods/code in random maps. Large map size is recommended.",
"Description" : "A demonstration of wall placement methods/code in random maps. Very large map size is recommended.",
"BaseTerrain" : ["grass1"],
"BaseHeight" : 0,
"Keywords": ["demo"],