Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/maps/random/mediterranean.js
Show All 15 Lines | |||||
* No further changes should be applied to the image to keep it easily interchangeable. | * No further changes should be applied to the image to keep it easily interchangeable. | ||||
*/ | */ | ||||
Engine.LoadLibrary("rmgen"); | Engine.LoadLibrary("rmgen"); | ||||
Engine.LoadLibrary("rmgen-common"); | Engine.LoadLibrary("rmgen-common"); | ||||
Engine.LoadLibrary("rmgen2"); | Engine.LoadLibrary("rmgen2"); | ||||
Engine.LoadLibrary("rmbiome"); | Engine.LoadLibrary("rmbiome"); | ||||
TILE_CENTERED_HEIGHT_MAP = true; | |||||
const tWater = "medit_sand_wet"; | const tWater = "medit_sand_wet"; | ||||
const tSnowedRocks = ["alpine_cliff_b", "alpine_cliff_snow"]; | const tSnowedRocks = ["alpine_cliff_b", "alpine_cliff_snow"]; | ||||
setBiome("generic/aegean"); | setBiome("generic/aegean"); | ||||
const heightScale = num => num * g_MapSettings.Size / 320; | const heightScale = num => num * g_MapSettings.Size / 320; | ||||
const heightSeaGround = heightScale(-6); | const heightSeaGround = heightScale(-6); | ||||
const heightWaterLevel = heightScale(0); | const heightWaterLevel = heightScale(0); | ||||
▲ Show 20 Lines • Show All 139 Lines • ▼ Show 20 Lines | if (!isNomad()) | ||||
g_Map.log("Flatten the initial CC area and placing playerbases"); | g_Map.log("Flatten the initial CC area and placing playerbases"); | ||||
for (let i = 0; i < getNumPlayers(); ++i) | for (let i = 0; i < getNumPlayers(); ++i) | ||||
{ | { | ||||
g_Map.logger.printDuration(); | g_Map.logger.printDuration(); | ||||
setBiome(climateZones.find(zone => zone.tileClass.has(playerPosition[i])).biome); | setBiome(climateZones.find(zone => zone.tileClass.has(playerPosition[i])).biome); | ||||
createArea( | createArea( | ||||
new ClumpPlacer(diskArea(defaultPlayerBaseRadius() * 0.8), 0.95, 0.6, Infinity, playerPosition[i]), | new ClumpPlacer(diskArea(defaultPlayerBaseRadius() * 0.8), 0.95, 0.6, Infinity, playerPosition[i]), | ||||
new SmoothElevationPainter(ELEVATION_SET, g_Map.getHeight(playerPosition[i]), 6)); | new SmoothElevationPainter(ELEVATION_SET, g_Map.getVertexHeight(playerPosition[i]), 6)); | ||||
createBase(playerIDs[i], playerPosition[i], mapSize >= 384); | createBase(playerIDs[i], playerPosition[i], mapSize >= 384); | ||||
} | } | ||||
} | } | ||||
Engine.SetProgress(50); | Engine.SetProgress(50); | ||||
for (let zone of climateZones) | for (let zone of climateZones) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 279 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator