Ticket #1855: addMauryanWallStyleToRmgen.patch

File addMauryanWallStyleToRmgen.patch, 3.5 KB (added by FeXoR, 11 years ago)

The SVN patch

  • binaries/data/mods/public/maps/random/rmgen/wall_builder.js

     
    108108var wallStyles = {};
    109109
    110110// Generic civ dependent wall style definition. "rome_siege" needs some tweek...
    111 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};
     111var 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};
    112112for (var style in wallScaleByType)
    113113{
    114114    var civ = style;
     
    158158wallStyles["gaul"]["wallFort"] = new WallElement("wallFort", "structures/gaul_fortress", PI, 4.2, 1.5);
    159159wallStyles["hele"]["wallFort"] = new WallElement("wallFort", "structures/hele_fortress", 2*PI/2 /* PI/2 */, 5.1 /* 5.6 */, 1.9 /* 1.9 */);
    160160wallStyles["iber"]["wallFort"] = new WallElement("wallFort", "structures/iber_fortress", PI, 5, 0.2);
     161wallStyles["maur"]["wallFort"] = new WallElement("wallFort", "structures/maur_fortress", PI, 5.5);
    161162wallStyles["mace"]["wallFort"] = new WallElement("wallFort", "structures/mace_fortress", 2*PI/2 /* PI/2 */, 5.1 /* 5.6 */, 1.9 /* 1.9 */);
    162163wallStyles["pers"]["wallFort"] = new WallElement("wallFort", "structures/pers_fortress", PI, 5.6/*5.5*/, 1.9/*1.7*/);
    163164wallStyles["rome"]["wallFort"] = new WallElement("wallFort", "structures/rome_fortress", PI, 6.3, 2.1);
  • binaries/data/mods/public/maps/random/wall_demo.js

     
    5757
    5858// General wall placement setup
    5959const distToMapBorder = 5;
    60 const distToOtherWalls = 5;
     60const distToOtherWalls = 10;
    6161var buildableMapSize = mapSize - 2 * distToMapBorder;
    6262var actualX = distToMapBorder;
    6363var actualY = distToMapBorder;
    6464// Wall styles are chosen by strings so the civ strings got by g_MapSettings.PlayerData[playerId - 1].Civ can be used
    6565// Other styles may be present as well but besides the civ styles only 'palisades' includes all wall element types (yet)
    66 const wallStyleList = ["athen", "brit", "cart", "celt", "gaul", "hele", "iber", "mace", "pers", "rome", "spart", "rome_siege", "palisades"];
     66const wallStyleList = ["athen", "brit", "cart", "celt", "gaul", "hele", "iber", "maur", "mace", "pers", "rome", "spart", "rome_siege", "palisades"];
    6767
    6868
    6969////////////////////////////////////////
  • binaries/data/mods/public/maps/random/wall_demo.json

     
    22    "settings" : {
    33        "Name" : "Wall Demo",
    44        "Script" : "wall_demo.js",
    5         "Description" : "A demonstration of wall placement methods/code in random maps. Large map size is recommended.",
     5        "Description" : "A demonstration of wall placement methods/code in random maps. Very Large map size is recommended.",
    66        "BaseTerrain" : ["grass1"],
    77        "BaseHeight" : 0,
    88        "Keywords": ["demo"],