Index: ps/trunk/binaries/data/mods/public/maps/random/archipelago.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/archipelago.js +++ ps/trunk/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: ps/trunk/binaries/data/mods/public/maps/random/archipelago.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/archipelago.json +++ ps/trunk/binaries/data/mods/public/maps/random/archipelago.json @@ -7,6 +7,7 @@ "BaseHeight" : -5, "Keywords": ["naval"], "Preview" : "archipelago.png", + "SupportedBiomes": true, "CircularMap" : true } } Index: ps/trunk/binaries/data/mods/public/maps/random/canyon.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/canyon.js +++ ps/trunk/binaries/data/mods/public/maps/random/canyon.js @@ -1,7 +1,6 @@ RMS.LoadLibrary("rmgen"); -//random terrain textures -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -383,7 +382,7 @@ [avoidClasses(clPlayer, 1, clForest, 15, clHill, 1, clHill2, 0), stayClasses(clLand, 4)], clForest, 1.0, - random_terrain + currentBiome() ); RMS.SetProgress(50); @@ -430,7 +429,7 @@ // create decoration var planetm = 1; -if (random_terrain == g_BiomeTropic) +if (currentBiome() == g_BiomeTropic) planetm = 8; createDecoration Index: ps/trunk/binaries/data/mods/public/maps/random/canyon.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/canyon.json +++ ps/trunk/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: ps/trunk/binaries/data/mods/public/maps/random/continent.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/continent.js +++ ps/trunk/binaries/data/mods/public/maps/random/continent.js @@ -1,7 +1,6 @@ RMS.LoadLibrary("rmgen"); -//random terrain textures -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -237,7 +236,7 @@ [avoidClasses(clPlayer, 20, clForest, 17, clHill, 0, clBaseResource,2), stayClasses(clLand, 4)], clForest, 1.0, - random_terrain + currentBiome() ); RMS.SetProgress(50); @@ -286,7 +285,7 @@ // create decoration var planetm = 1; -if (random_terrain == g_BiomeTropic) +if (currentBiome() == g_BiomeTropic) planetm = 8; createDecoration Index: ps/trunk/binaries/data/mods/public/maps/random/continent.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/continent.json +++ ps/trunk/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: ps/trunk/binaries/data/mods/public/maps/random/empire.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/empire.js +++ ps/trunk/binaries/data/mods/public/maps/random/empire.js @@ -3,7 +3,7 @@ InitMap(); -randomizeBiome(); +setSelectedBiome(); initMapSettings(); initTileClasses(); Index: ps/trunk/binaries/data/mods/public/maps/random/empire.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/empire.json +++ ps/trunk/binaries/data/mods/public/maps/random/empire.json @@ -7,6 +7,7 @@ "BaseHeight" : 2, "Keywords": [], "Preview" : "empire.png", + "SupportedBiomes": true, "CircularMap" : true } } Index: ps/trunk/binaries/data/mods/public/maps/random/frontier.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/frontier.js +++ ps/trunk/binaries/data/mods/public/maps/random/frontier.js @@ -3,7 +3,7 @@ InitMap(); -randomizeBiome(); +setSelectedBiome(); initMapSettings(); initTileClasses(); Index: ps/trunk/binaries/data/mods/public/maps/random/frontier.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/frontier.json +++ ps/trunk/binaries/data/mods/public/maps/random/frontier.json @@ -6,6 +6,7 @@ "BaseTerrain" : ["medit_sea_depths"], "Preview" : "frontier.png", "BaseHeight" : 2, + "SupportedBiomes": true, "CircularMap" : true } } Index: ps/trunk/binaries/data/mods/public/maps/random/gear.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/gear.js +++ ps/trunk/binaries/data/mods/public/maps/random/gear.js @@ -2,8 +2,7 @@ TILE_CENTERED_HEIGHT_MAP = true; -//random terrain textures -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -364,7 +363,7 @@ avoidClasses(clPlayer, 20, clForest, 17, clHill, 0, clWater, 2), clForest, 1.0, - random_terrain + currentBiome() ); RMS.SetProgress(50); @@ -417,7 +416,7 @@ // create decoration var planetm = 1; -if (random_terrain == g_BiomeTropic) +if (currentBiome() == g_BiomeTropic) planetm = 8; createDecoration Index: ps/trunk/binaries/data/mods/public/maps/random/gear.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/gear.json +++ ps/trunk/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: ps/trunk/binaries/data/mods/public/maps/random/harbor.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/harbor.js +++ ps/trunk/binaries/data/mods/public/maps/random/harbor.js @@ -3,7 +3,7 @@ InitMap(); -randomizeBiome(); +setSelectedBiome(); initMapSettings(); initTileClasses(); Index: ps/trunk/binaries/data/mods/public/maps/random/harbor.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/harbor.json +++ ps/trunk/binaries/data/mods/public/maps/random/harbor.json @@ -7,6 +7,7 @@ "BaseHeight" : 2, "Keywords": [], "Preview" : "harbor.png", + "SupportedBiomes": true, "CircularMap" : true } } Index: ps/trunk/binaries/data/mods/public/maps/random/hells_pass.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/hells_pass.js +++ ps/trunk/binaries/data/mods/public/maps/random/hells_pass.js @@ -3,7 +3,7 @@ InitMap(); -randomizeBiome(); +setSelectedBiome(); initMapSettings(); initTileClasses(); Index: ps/trunk/binaries/data/mods/public/maps/random/hells_pass.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/hells_pass.json +++ ps/trunk/binaries/data/mods/public/maps/random/hells_pass.json @@ -6,6 +6,7 @@ "BaseTerrain" : ["medit_sea_depths"], "BaseHeight" : 1, "Preview" : "hells_pass.png", + "SupportedBiomes": true, "CircularMap" : true } } Index: ps/trunk/binaries/data/mods/public/maps/random/island_stronghold.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/island_stronghold.js +++ ps/trunk/binaries/data/mods/public/maps/random/island_stronghold.js @@ -528,7 +528,7 @@ placeDefaultDecoratives(fx, fz, aGrassShort, clBaseResource, radius, [stayClasses(clLand, 5)]); log("Creating small grass tufts..."); -let planetm = currentBiome() == 7 ? 8 : 1; +let planetm = currentBiome() == g_BiomeTropic ? 8 : 1; group = new SimpleGroup( [new SimpleObject(aGrassShort, 1, 2, 0, 1, -PI / 8, PI / 8)] ); Index: ps/trunk/binaries/data/mods/public/maps/random/islands.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/islands.js +++ ps/trunk/binaries/data/mods/public/maps/random/islands.js @@ -1,8 +1,8 @@ RMS.LoadLibrary("rmgen"); 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: ps/trunk/binaries/data/mods/public/maps/random/islands.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/islands.json +++ ps/trunk/binaries/data/mods/public/maps/random/islands.json @@ -7,6 +7,7 @@ "BaseHeight" : -5, "Keywords": ["naval"], "Preview" : "islands.png", + "SupportedBiomes": true, "CircularMap" : true } } Index: ps/trunk/binaries/data/mods/public/maps/random/lake.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/lake.js +++ ps/trunk/binaries/data/mods/public/maps/random/lake.js @@ -1,7 +1,6 @@ RMS.LoadLibrary("rmgen"); -//random terrain textures -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -250,7 +249,7 @@ avoidClasses(clPlayer, 20, clForest, 17, clHill, 0, clWater, 2), clForest, 1.0, - random_terrain + currentBiome() ); RMS.SetProgress(50); @@ -299,7 +298,7 @@ // create decoration var planetm = 1; -if (random_terrain == g_BiomeTropic) +if (currentBiome() == g_BiomeTropic) planetm = 8; createDecoration Index: ps/trunk/binaries/data/mods/public/maps/random/lake.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/lake.json +++ ps/trunk/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: ps/trunk/binaries/data/mods/public/maps/random/lions_den.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/lions_den.js +++ ps/trunk/binaries/data/mods/public/maps/random/lions_den.js @@ -3,7 +3,7 @@ InitMap(); -randomizeBiome(); +setSelectedBiome(); initMapSettings(); initTileClasses(["step"]); Index: ps/trunk/binaries/data/mods/public/maps/random/lions_den.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/lions_den.json +++ ps/trunk/binaries/data/mods/public/maps/random/lions_den.json @@ -7,6 +7,7 @@ "BaseHeight" : 50, "Preview" : "lions_den.png", "Keywords": [], + "SupportedBiomes": true, "CircularMap" : true } } Index: ps/trunk/binaries/data/mods/public/maps/random/mainland.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/mainland.js +++ ps/trunk/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: ps/trunk/binaries/data/mods/public/maps/random/mainland.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/mainland.json +++ ps/trunk/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: ps/trunk/binaries/data/mods/public/maps/random/migration.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/migration.js +++ ps/trunk/binaries/data/mods/public/maps/random/migration.js @@ -1,7 +1,6 @@ RMS.LoadLibrary("rmgen"); -//random terrain textures -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -258,13 +257,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 +287,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 +448,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: ps/trunk/binaries/data/mods/public/maps/random/migration.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/migration.json +++ ps/trunk/binaries/data/mods/public/maps/random/migration.json @@ -7,6 +7,7 @@ "BaseHeight" : -5, "Keywords": ["naval"], "Preview" : "migration.png", + "SupportedBiomes": true, "CircularMap" : true } } Index: ps/trunk/binaries/data/mods/public/maps/random/rivers.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/rivers.js +++ ps/trunk/binaries/data/mods/public/maps/random/rivers.js @@ -1,7 +1,6 @@ RMS.LoadLibrary("rmgen"); -//random terrain textures -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -18,7 +17,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 +379,7 @@ avoidClasses(clPlayer, 20, clForest, 17, clHill, 0, clWater, 2), clForest, 1.0, - random_terrain + currentBiome() ); RMS.SetProgress(50); @@ -429,7 +428,7 @@ // create decoration var planetm = 1; -if (random_terrain == g_BiomeTropic) +if (currentBiome() == g_BiomeTropic) planetm = 8; createDecoration Index: ps/trunk/binaries/data/mods/public/maps/random/rivers.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/rivers.json +++ ps/trunk/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: ps/trunk/binaries/data/mods/public/maps/random/snowflake_searocks.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/snowflake_searocks.js +++ ps/trunk/binaries/data/mods/public/maps/random/snowflake_searocks.js @@ -1,7 +1,6 @@ RMS.LoadLibrary("rmgen"); -//random terrain textures -var random_terrain = randomizeBiome(); +setSelectedBiome(); const tMainTerrain = rBiomeT1(); const tForestFloor1 = rBiomeT2(); @@ -1656,13 +1655,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 +1684,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 +1847,7 @@ } var planetm = 1; -if (random_terrain == g_BiomeTropic) +if (currentBiome() == g_BiomeTropic) planetm = 8; //create small grass tufts Index: ps/trunk/binaries/data/mods/public/maps/random/snowflake_searocks.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/snowflake_searocks.json +++ ps/trunk/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: ps/trunk/binaries/data/mods/public/maps/random/stronghold.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/stronghold.js +++ ps/trunk/binaries/data/mods/public/maps/random/stronghold.js @@ -3,7 +3,7 @@ InitMap(); -randomizeBiome(); +setSelectedBiome(); initMapSettings(); initTileClasses(); Index: ps/trunk/binaries/data/mods/public/maps/random/stronghold.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/stronghold.json +++ ps/trunk/binaries/data/mods/public/maps/random/stronghold.json @@ -6,6 +6,7 @@ "BaseTerrain" : ["medit_sea_depths"], "BaseHeight" : 30, "Preview" : "stronghold.png", + "SupportedBiomes": true, "CircularMap" : true } } Index: ps/trunk/binaries/data/mods/public/maps/random/survivalofthefittest.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/survivalofthefittest.js +++ ps/trunk/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: ps/trunk/binaries/data/mods/public/maps/random/survivalofthefittest.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/survivalofthefittest.json +++ ps/trunk/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: ps/trunk/binaries/data/mods/public/maps/random/unknown.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/unknown.js +++ ps/trunk/binaries/data/mods/public/maps/random/unknown.js @@ -1,8 +1,8 @@ RMS.LoadLibrary("rmgen"); 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: ps/trunk/binaries/data/mods/public/maps/random/unknown.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/unknown.json +++ ps/trunk/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: ps/trunk/binaries/data/mods/public/maps/random/unknown_land.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/unknown_land.js +++ ps/trunk/binaries/data/mods/public/maps/random/unknown_land.js @@ -1,8 +1,8 @@ RMS.LoadLibrary("rmgen"); 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: ps/trunk/binaries/data/mods/public/maps/random/unknown_land.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/unknown_land.json +++ ps/trunk/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 } } Index: ps/trunk/binaries/data/mods/public/maps/random/unknown_nomad.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/unknown_nomad.js +++ ps/trunk/binaries/data/mods/public/maps/random/unknown_nomad.js @@ -1,8 +1,8 @@ RMS.LoadLibrary("rmgen"); TILE_CENTERED_HEIGHT_MAP = true; -//random terrain textures -var rt = randomizeBiome(); + +setSelectedBiome(); var tGrass = rBiomeT1(); var tGrassPForest = rBiomeT2(); @@ -1401,13 +1401,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 (rt == 6) +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 (rt == 7) +else if (currentBiome() == g_BiomeTropic) { var MIN_TREES = floor(1000*multiplier); var MAX_TREES = floor(6000*multiplier); @@ -1430,7 +1430,7 @@ [[tGrassPForest, tGrass, pForestP], [tGrassPForest, pForestP]] ]; // some variation -if (rt == 6) +if (currentBiome() == g_BiomeSavanna) { var size = numForest / (0.5 * scaleByMapSize(2,8) * numPlayers); } @@ -1459,7 +1459,7 @@ log("Creating dirt patches..."); var sizes = [scaleByMapSize(3, 48), scaleByMapSize(5, 84), scaleByMapSize(8, 128)]; var numb = 1; -if (rt == 6) +if (currentBiome() == g_BiomeSavanna) numb = 3; for (var i = 0; i < sizes.length; i++) { Index: ps/trunk/binaries/data/mods/public/maps/random/unknown_nomad.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/unknown_nomad.json +++ ps/trunk/binaries/data/mods/public/maps/random/unknown_nomad.json @@ -6,6 +6,7 @@ "BaseTerrain" : ["medit_sand_wet"], "BaseHeight" : -5, "Preview" : "unknown.png", + "SupportedBiomes": true, "CircularMap" : true } } Index: ps/trunk/binaries/data/mods/public/maps/random/wild_lake.js =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/wild_lake.js +++ ps/trunk/binaries/data/mods/public/maps/random/wild_lake.js @@ -15,7 +15,7 @@ return stringOrArrayOfStrings; } -randomizeBiome() +setSelectedBiome(); // Terrain, entities and actors let wildLakeBiome = [ Index: ps/trunk/binaries/data/mods/public/maps/random/wild_lake.json =================================================================== --- ps/trunk/binaries/data/mods/public/maps/random/wild_lake.json +++ ps/trunk/binaries/data/mods/public/maps/random/wild_lake.json @@ -7,6 +7,7 @@ "CircularMap" : true, "BaseTerrain" : "whiteness", "Keywords": [], - "BaseHeight" : 0 + "BaseHeight" : 0, + "SupportedBiomes": true } }