Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/maps/random/northern_lights.js
Show First 20 Lines • Show All 174 Lines • ▼ Show 20 Lines | for (var iz = 0; iz < mapSize; iz++) | ||||
} | } | ||||
} | } | ||||
} | } | ||||
// create shore | // create shore | ||||
log("Creating shores..."); | log("Creating shores..."); | ||||
for (var i = 0; i < scaleByMapSize(20,120); i++) | for (var i = 0; i < scaleByMapSize(20,120); i++) | ||||
{ | { | ||||
placer = new ChainPlacer(1, floor(scaleByMapSize(4, 6)), floor(scaleByMapSize(16, 30)), 1, floor(randFloat(0.1,0.9)*mapSize), floor(randFloat(0.67,0.74)*mapSize)); | placer = new ChainPlacer( | ||||
1, | |||||
Math.floor(scaleByMapSize(4, 6)), | |||||
Math.floor(scaleByMapSize(16, 30)), | |||||
1, | |||||
randIntExclusive(0.1 * mapSize, 0.9 * mapSize), | |||||
randIntExclusive(0.67 * mapSize, 0.74 * mapSize)); | |||||
var terrainPainter = new LayeredPainter( | var terrainPainter = new LayeredPainter( | ||||
[tSnowA, tSnowA], // terrains | [tSnowA, tSnowA], // terrains | ||||
[2] // widths | [2] // widths | ||||
); | ); | ||||
var elevationPainter = new SmoothElevationPainter(ELEVATION_SET, 3, 3); | var elevationPainter = new SmoothElevationPainter(ELEVATION_SET, 3, 3); | ||||
createArea( | createArea( | ||||
placer, | placer, | ||||
[terrainPainter, elevationPainter, unPaintClass(clWater)], | [terrainPainter, elevationPainter, unPaintClass(clWater)], | ||||
▲ Show 20 Lines • Show All 230 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator