Index: binaries/data/mods/public/maps/random/archipelago.js =================================================================== --- binaries/data/mods/public/maps/random/archipelago.js +++ binaries/data/mods/public/maps/random/archipelago.js @@ -2,7 +2,7 @@ TILE_CENTERED_HEIGHT_MAP = true; -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -224,7 +224,7 @@ [avoidClasses(clPlayer, 20, clForest, 17, clHill, 0), stayClasses(clLand, 4)], clForest, 1.0, - random_terrain + currentBiome() ); RMS.SetProgress(50); @@ -264,7 +264,7 @@ RMS.SetProgress(65); log("Creating decoration..."); -var planetm = random_terrain == g_BiomeTropic ? 8 : 1; +var planetm = currentBiome() == g_BiomeTropic ? 8 : 1; createDecoration ( [[new SimpleObject(aRockMedium, 1,3, 0,1)], Index: binaries/data/mods/public/maps/random/archipelago.json =================================================================== --- binaries/data/mods/public/maps/random/archipelago.json +++ binaries/data/mods/public/maps/random/archipelago.json @@ -7,6 +7,7 @@ "BaseHeight" : -5, "Keywords": ["naval"], "Preview" : "archipelago.png", + "SupportedBiomes": true, "CircularMap" : true } } Index: binaries/data/mods/public/maps/random/canyon.js =================================================================== --- binaries/data/mods/public/maps/random/canyon.js +++ binaries/data/mods/public/maps/random/canyon.js @@ -1,7 +1,7 @@ RMS.LoadLibrary("rmgen"); //random terrain textures -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -383,7 +383,7 @@ [avoidClasses(clPlayer, 1, clForest, 15, clHill, 1, clHill2, 0), stayClasses(clLand, 4)], clForest, 1.0, - random_terrain + currentBiome() ); RMS.SetProgress(50); @@ -430,7 +430,7 @@ // create decoration var planetm = 1; -if (random_terrain == g_BiomeTropic) +if (currentBiome() == g_BiomeTropic) planetm = 8; createDecoration Index: binaries/data/mods/public/maps/random/canyon.json =================================================================== --- binaries/data/mods/public/maps/random/canyon.json +++ binaries/data/mods/public/maps/random/canyon.json @@ -6,6 +6,7 @@ "BaseTerrain" : ["medit_sea_depths"], "BaseHeight" : 30, "Preview" : "canyon.png", + "SupportedBiomes": true, "CircularMap" : true } } \ No newline at end of file Index: binaries/data/mods/public/maps/random/continent.js =================================================================== --- binaries/data/mods/public/maps/random/continent.js +++ binaries/data/mods/public/maps/random/continent.js @@ -1,7 +1,7 @@ RMS.LoadLibrary("rmgen"); //random terrain textures -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -237,7 +237,7 @@ [avoidClasses(clPlayer, 20, clForest, 17, clHill, 0, clBaseResource,2), stayClasses(clLand, 4)], clForest, 1.0, - random_terrain + currentBiome() ); RMS.SetProgress(50); @@ -286,7 +286,7 @@ // create decoration var planetm = 1; -if (random_terrain == g_BiomeTropic) +if (currentBiome() == g_BiomeTropic) planetm = 8; createDecoration Index: binaries/data/mods/public/maps/random/continent.json =================================================================== --- binaries/data/mods/public/maps/random/continent.json +++ binaries/data/mods/public/maps/random/continent.json @@ -6,6 +6,7 @@ "BaseTerrain" : ["medit_sea_depths"], "BaseHeight" : -5, "Preview" : "continent.png", + "SupportedBiomes": true, "CircularMap" : true } } Index: binaries/data/mods/public/maps/random/gear.js =================================================================== --- binaries/data/mods/public/maps/random/gear.js +++ binaries/data/mods/public/maps/random/gear.js @@ -3,7 +3,7 @@ TILE_CENTERED_HEIGHT_MAP = true; //random terrain textures -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -364,7 +364,7 @@ avoidClasses(clPlayer, 20, clForest, 17, clHill, 0, clWater, 2), clForest, 1.0, - random_terrain + currentBiome() ); RMS.SetProgress(50); @@ -417,7 +417,7 @@ // create decoration var planetm = 1; -if (random_terrain == g_BiomeTropic) +if (currentBiome() == g_BiomeTropic) planetm = 8; createDecoration Index: binaries/data/mods/public/maps/random/gear.json =================================================================== --- binaries/data/mods/public/maps/random/gear.json +++ binaries/data/mods/public/maps/random/gear.json @@ -6,6 +6,7 @@ "BaseTerrain" : ["medit_sea_depths"], "BaseHeight" : 4, "CircularMap" : true, + "SupportedBiomes": true, "Preview" : "gear.png" } } \ No newline at end of file Index: binaries/data/mods/public/maps/random/islands.js =================================================================== --- binaries/data/mods/public/maps/random/islands.js +++ binaries/data/mods/public/maps/random/islands.js @@ -2,7 +2,7 @@ TILE_CENTERED_HEIGHT_MAP = true; //random terrain textures -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -320,13 +320,13 @@ // calculate desired number of trees for map (based on size) -if (random_terrain == g_BiomeSavanna) +if (currentBiome() == g_BiomeSavanna) { var MIN_TREES = 200; var MAX_TREES = 1250; var P_FOREST = 0; } -else if (random_terrain == g_BiomeTropic) +else if (currentBiome() == g_BiomeTropic) { var MIN_TREES = 1000; var MAX_TREES = 6000; @@ -349,7 +349,7 @@ [[tForestFloor1, tMainTerrain, pForest2], [tForestFloor1, pForest2]] ]; // some variation -if (random_terrain != g_BiomeSavanna) +if (currentBiome() != g_BiomeSavanna) { var size = numForest / (scaleByMapSize(3,6) * numPlayers); var num = floor(size / types.length); @@ -374,7 +374,7 @@ log("Creating dirt patches..."); var sizes = [scaleByMapSize(3, 6), scaleByMapSize(5, 10), scaleByMapSize(8, 21)]; var numb = 1; -if (random_terrain == g_BiomeSavanna) +if (currentBiome() == g_BiomeSavanna) numb = 3; for (var i = 0; i < sizes.length; i++) { @@ -526,7 +526,7 @@ } var planetm = 1; -if (random_terrain == g_BiomeTropic) +if (currentBiome() == g_BiomeTropic) planetm = 8; //create small grass tufts Index: binaries/data/mods/public/maps/random/islands.json =================================================================== --- binaries/data/mods/public/maps/random/islands.json +++ binaries/data/mods/public/maps/random/islands.json @@ -7,6 +7,7 @@ "BaseHeight" : -5, "Keywords": ["naval"], "Preview" : "islands.png", + "SupportedBiomes": true, "CircularMap" : true } } Index: binaries/data/mods/public/maps/random/lake.js =================================================================== --- binaries/data/mods/public/maps/random/lake.js +++ binaries/data/mods/public/maps/random/lake.js @@ -1,7 +1,7 @@ RMS.LoadLibrary("rmgen"); //random terrain textures -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -250,7 +250,7 @@ avoidClasses(clPlayer, 20, clForest, 17, clHill, 0, clWater, 2), clForest, 1.0, - random_terrain + currentBiome() ); RMS.SetProgress(50); @@ -299,7 +299,7 @@ // create decoration var planetm = 1; -if (random_terrain == g_BiomeTropic) +if (currentBiome() == g_BiomeTropic) planetm = 8; createDecoration Index: binaries/data/mods/public/maps/random/lake.json =================================================================== --- binaries/data/mods/public/maps/random/lake.json +++ binaries/data/mods/public/maps/random/lake.json @@ -6,6 +6,7 @@ "BaseTerrain" : ["medit_sea_depths"], "BaseHeight" : 3, "Preview" : "lake.png", + "SupportedBiomes": true, "CircularMap" : true } } \ No newline at end of file Index: binaries/data/mods/public/maps/random/mainland.js =================================================================== --- binaries/data/mods/public/maps/random/mainland.js +++ binaries/data/mods/public/maps/random/mainland.js @@ -1,7 +1,7 @@ RMS.LoadLibrary("rmgen"); //random terrain textures -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -198,7 +198,7 @@ avoidClasses(clPlayer, 20, clForest, 18, clHill, 0), clForest, 1.0, - random_terrain + currentBiome() ); RMS.SetProgress(50); @@ -245,7 +245,7 @@ // create decoration var planetm = 1; -if (random_terrain == g_BiomeTropic) +if (currentBiome() == g_BiomeTropic) planetm = 8; createDecoration Index: binaries/data/mods/public/maps/random/mainland.json =================================================================== --- binaries/data/mods/public/maps/random/mainland.json +++ binaries/data/mods/public/maps/random/mainland.json @@ -6,6 +6,7 @@ "BaseTerrain" : ["medit_sea_depths"], "BaseHeight" : 3, "Preview" : "mainland.png", + "SupportedBiomes": true, "CircularMap" : true } } Index: binaries/data/mods/public/maps/random/migration.js =================================================================== --- binaries/data/mods/public/maps/random/migration.js +++ binaries/data/mods/public/maps/random/migration.js @@ -1,7 +1,7 @@ RMS.LoadLibrary("rmgen"); //random terrain textures -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -258,13 +258,13 @@ RMS.SetProgress(34); // calculate desired number of trees for map (based on size) -if (random_terrain == g_BiomeSavanna) +if (currentBiome() == g_BiomeSavanna) { var MIN_TREES = 200; var MAX_TREES = 1250; var P_FOREST = 0.02; } -else if (random_terrain == g_BiomeTropic) +else if (currentBiome() == g_BiomeTropic) { var MIN_TREES = 1000; var MAX_TREES = 6000; @@ -288,7 +288,7 @@ ]; // some variation var size = numForest / (scaleByMapSize(2,8) * numPlayers) * - (random_terrain == g_BiomeSavanna ? 2 : 1); + (currentBiome() == g_BiomeSavanna ? 2 : 1); var num = floor(size / types.length); for (var i = 0; i < types.length; ++i) @@ -449,7 +449,7 @@ } RMS.SetProgress(86); -var planetm = random_terrain == g_BiomeTropic ? 8 : 1; +var planetm = currentBiome() == g_BiomeTropic ? 8 : 1; log("Creating small grass tufts..."); group = new SimpleGroup( Index: binaries/data/mods/public/maps/random/migration.json =================================================================== --- binaries/data/mods/public/maps/random/migration.json +++ binaries/data/mods/public/maps/random/migration.json @@ -7,6 +7,7 @@ "BaseHeight" : -5, "Keywords": ["naval"], "Preview" : "migration.png", + "SupportedBiomes": true, "CircularMap" : true } } Index: binaries/data/mods/public/maps/random/rivers.js =================================================================== --- binaries/data/mods/public/maps/random/rivers.js +++ binaries/data/mods/public/maps/random/rivers.js @@ -1,7 +1,7 @@ RMS.LoadLibrary("rmgen"); //random terrain textures -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -18,7 +18,7 @@ const tShoreBlend = rBiomeT13(); var tShore = rBiomeT14(); var tWater = rBiomeT15(); -if (random_terrain == g_BiomeTropic) +if (currentBiome() == g_BiomeTropic) { tShore = "tropic_dirt_b_plants"; tWater = "tropic_dirt_b"; @@ -380,7 +380,7 @@ avoidClasses(clPlayer, 20, clForest, 17, clHill, 0, clWater, 2), clForest, 1.0, - random_terrain + currentBiome() ); RMS.SetProgress(50); @@ -429,7 +429,7 @@ // create decoration var planetm = 1; -if (random_terrain == g_BiomeTropic) +if (currentBiome() == g_BiomeTropic) planetm = 8; createDecoration Index: binaries/data/mods/public/maps/random/rivers.json =================================================================== --- binaries/data/mods/public/maps/random/rivers.json +++ binaries/data/mods/public/maps/random/rivers.json @@ -6,6 +6,7 @@ "BaseTerrain" : ["temp_grass", "temp_grass_c"], "BaseHeight" : 1, "Preview" : "rivers.png", + "SupportedBiomes": true, "CircularMap" : true } } \ No newline at end of file Index: binaries/data/mods/public/maps/random/snowflake_searocks.js =================================================================== --- binaries/data/mods/public/maps/random/snowflake_searocks.js +++ binaries/data/mods/public/maps/random/snowflake_searocks.js @@ -1,7 +1,7 @@ RMS.LoadLibrary("rmgen"); //random terrain textures -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -1656,13 +1656,13 @@ } // calculate desired number of trees for map (based on size) -if (random_terrain == g_BiomeSavanna) +if (currentBiome() == g_BiomeSavanna) { var MIN_TREES = 200; var MAX_TREES = 1250; var P_FOREST = 0.02; } -else if (random_terrain == g_BiomeTropic) +else if (currentBiome() == g_BiomeTropic) { var MIN_TREES = 1000; var MAX_TREES = 6000; @@ -1685,7 +1685,7 @@ [[tForestFloor1, tMainTerrain, pForest2], [tForestFloor1, pForest2]] ]; // some variation -if (random_terrain == g_BiomeSavanna) +if (currentBiome() == g_BiomeSavanna) var size = numForest / (0.5 * scaleByMapSize(2,8) * numPlayers); else var size = numForest / (scaleByMapSize(2,8) * numPlayers); @@ -1848,7 +1848,7 @@ } var planetm = 1; -if (random_terrain == g_BiomeTropic) +if (currentBiome() == g_BiomeTropic) planetm = 8; //create small grass tufts Index: binaries/data/mods/public/maps/random/snowflake_searocks.json =================================================================== --- binaries/data/mods/public/maps/random/snowflake_searocks.json +++ binaries/data/mods/public/maps/random/snowflake_searocks.json @@ -6,6 +6,7 @@ "BaseTerrain" : ["medit_sea_depths"], "BaseHeight" : -5, "Preview" : "snowflake_searocks.png", + "SupportedBiomes": true, "CircularMap" : true } } Index: binaries/data/mods/public/maps/random/survivalofthefittest.js =================================================================== --- binaries/data/mods/public/maps/random/survivalofthefittest.js +++ binaries/data/mods/public/maps/random/survivalofthefittest.js @@ -1,6 +1,6 @@ RMS.LoadLibrary("rmgen"); -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -185,7 +185,7 @@ [avoidClasses(clPlayer, 20, clForest, 5, clHill, 0, clBaseResource,2, clWomen, 5), stayClasses(clLand, 4)], clForest, 1, - random_terrain + currentBiome() ); if (randBool()) @@ -230,7 +230,7 @@ ); var planetm = 1; -if (random_terrain == g_BiomeTropic) +if (currentBiome() == g_BiomeTropic) planetm = 8; createDecoration( Index: binaries/data/mods/public/maps/random/survivalofthefittest.json =================================================================== --- binaries/data/mods/public/maps/random/survivalofthefittest.json +++ binaries/data/mods/public/maps/random/survivalofthefittest.json @@ -7,6 +7,7 @@ "BaseHeight" : 30, "Keywords": ["trigger"], "Preview" : "survivalofthefittest.png", + "SupportedBiomes": true, "CircularMap" : true, "TriggerScripts": [ "scripts/TriggerHelper.js", Index: binaries/data/mods/public/maps/random/unknown.js =================================================================== --- binaries/data/mods/public/maps/random/unknown.js +++ binaries/data/mods/public/maps/random/unknown.js @@ -2,7 +2,7 @@ TILE_CENTERED_HEIGHT_MAP = true; //random terrain textures -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -1765,13 +1765,13 @@ var multiplier = sqrt(randFloat(0.5,1.2)*randFloat(0.5,1.2)); // calculate desired number of trees for map (based on size) -if (random_terrain == g_BiomeSavanna) +if (currentBiome() == g_BiomeSavanna) { var MIN_TREES = floor(200*multiplier); var MAX_TREES = floor(1250*multiplier); var P_FOREST = randFloat(0.02, 0.05); } -else if (random_terrain == g_BiomeTropic) +else if (currentBiome() == g_BiomeTropic) { var MIN_TREES = floor(1000*multiplier); var MAX_TREES = floor(6000*multiplier); @@ -1794,7 +1794,7 @@ [[tForestFloor1, tMainTerrain, pForest2], [tForestFloor1, pForest2]] ]; // some variation -if (random_terrain == g_BiomeSavanna) +if (currentBiome() == g_BiomeSavanna) var size = numForest / (0.5 * scaleByMapSize(2,8) * numPlayers); else var size = numForest / (scaleByMapSize(2,8) * numPlayers); @@ -1820,7 +1820,7 @@ log("Creating dirt patches..."); var sizes = [scaleByMapSize(3, 48), scaleByMapSize(5, 84), scaleByMapSize(8, 128)]; var numb = 1; -if (random_terrain == g_BiomeSavanna) +if (currentBiome() == g_BiomeSavanna) numb = 3; for (var i = 0; i < sizes.length; i++) { @@ -1972,7 +1972,7 @@ } var planetm = 1; -if (random_terrain == g_BiomeTropic) +if (currentBiome() == g_BiomeTropic) planetm = 8; //create small grass tufts Index: binaries/data/mods/public/maps/random/unknown.json =================================================================== --- binaries/data/mods/public/maps/random/unknown.json +++ binaries/data/mods/public/maps/random/unknown.json @@ -6,6 +6,7 @@ "BaseTerrain" : ["medit_sand_wet"], "BaseHeight" : -5, "Preview" : "unknown.png", + "SupportedBiomes": true, "CircularMap" : true } } Index: binaries/data/mods/public/maps/random/unknown_land.js =================================================================== --- binaries/data/mods/public/maps/random/unknown_land.js +++ binaries/data/mods/public/maps/random/unknown_land.js @@ -2,7 +2,7 @@ TILE_CENTERED_HEIGHT_MAP = true; //random terrain textures -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -1534,13 +1534,13 @@ var multiplier = sqrt(randFloat(0.5,1.2)*randFloat(0.5,1.2)); // calculate desired number of trees for map (based on size) -if (random_terrain == g_BiomeSavanna) +if (currentBiome() == g_BiomeSavanna) { var MIN_TREES = floor(200*multiplier); var MAX_TREES = floor(1250*multiplier); var P_FOREST = 0; } -else if (random_terrain == g_BiomeTropic) +else if (currentBiome() == g_BiomeTropic) { var MIN_TREES = floor(1000*multiplier); var MAX_TREES = floor(6000*multiplier); @@ -1563,7 +1563,7 @@ [[tForestFloor1, tMainTerrain, pForest2], [tForestFloor1, pForest2]] ]; // some variation -if (random_terrain != g_BiomeSavanna) +if (currentBiome() != g_BiomeSavanna) { var size = numForest / (scaleByMapSize(3,6) * numPlayers); var num = floor(size / types.length); @@ -1588,7 +1588,7 @@ log("Creating dirt patches..."); var sizes = [scaleByMapSize(3, 6), scaleByMapSize(5, 10), scaleByMapSize(8, 21)]; var numb = 1; -if (random_terrain == 6) +if (currentBiome() == g_BiomeSavanna) numb = 3; for (var i = 0; i < sizes.length; i++) { @@ -1740,7 +1740,7 @@ } var planetm = 1; -if (random_terrain == g_BiomeTropic) +if (currentBiome() == g_BiomeTropic) planetm = 8; //create small grass tufts Index: binaries/data/mods/public/maps/random/unknown_land.json =================================================================== --- binaries/data/mods/public/maps/random/unknown_land.json +++ binaries/data/mods/public/maps/random/unknown_land.json @@ -6,6 +6,7 @@ "BaseTerrain" : ["medit_sand_wet"], "BaseHeight" : -5, "Preview" : "unknown.png", + "SupportedBiomes": true, "CircularMap" : true } }