Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/maps/random/canyon.js
RMS.LoadLibrary("rmgen"); | RMS.LoadLibrary("rmgen"); | ||||
//random terrain textures | setSelectedBiome(); | ||||
var random_terrain = randomizeBiome(); | |||||
const tMainTerrain = rBiomeT1(); | const tMainTerrain = rBiomeT1(); | ||||
const tForestFloor1 = rBiomeT2(); | const tForestFloor1 = rBiomeT2(); | ||||
const tForestFloor2 = rBiomeT3(); | const tForestFloor2 = rBiomeT3(); | ||||
const tCliff = rBiomeT4(); | const tCliff = rBiomeT4(); | ||||
const tTier1Terrain = rBiomeT5(); | const tTier1Terrain = rBiomeT5(); | ||||
const tTier2Terrain = rBiomeT6(); | const tTier2Terrain = rBiomeT6(); | ||||
const tTier3Terrain = rBiomeT7(); | const tTier3Terrain = rBiomeT7(); | ||||
▲ Show 20 Lines • Show All 365 Lines • ▼ Show 20 Lines | |||||
createHills([tCliff, tCliff, tMainTerrain], avoidClasses(clLand, 1, clHill, 1), clHill, scaleByMapSize(20, 150), undefined, undefined, undefined, undefined, 40); | createHills([tCliff, tCliff, tMainTerrain], avoidClasses(clLand, 1, clHill, 1), clHill, scaleByMapSize(20, 150), undefined, undefined, undefined, undefined, 40); | ||||
// create forests | // create forests | ||||
createForests( | createForests( | ||||
[tMainTerrain, tForestFloor1, tForestFloor2, pForest1, pForest2], | [tMainTerrain, tForestFloor1, tForestFloor2, pForest1, pForest2], | ||||
[avoidClasses(clPlayer, 1, clForest, 15, clHill, 1, clHill2, 0), stayClasses(clLand, 4)], | [avoidClasses(clPlayer, 1, clForest, 15, clHill, 1, clHill2, 0), stayClasses(clLand, 4)], | ||||
clForest, | clForest, | ||||
1.0, | 1.0, | ||||
random_terrain | currentBiome() | ||||
); | ); | ||||
RMS.SetProgress(50); | RMS.SetProgress(50); | ||||
// create dirt patches | // create dirt patches | ||||
log("Creating dirt patches..."); | log("Creating dirt patches..."); | ||||
createLayeredPatches( | createLayeredPatches( | ||||
[scaleByMapSize(3, 6), scaleByMapSize(5, 10), scaleByMapSize(8, 21)], | [scaleByMapSize(3, 6), scaleByMapSize(5, 10), scaleByMapSize(8, 21)], | ||||
Show All 30 Lines | |||||
clMetal | clMetal | ||||
); | ); | ||||
RMS.SetProgress(65); | RMS.SetProgress(65); | ||||
// create decoration | // create decoration | ||||
var planetm = 1; | var planetm = 1; | ||||
if (random_terrain == g_BiomeTropic) | if (currentBiome() == g_BiomeTropic) | ||||
planetm = 8; | planetm = 8; | ||||
createDecoration | createDecoration | ||||
( | ( | ||||
[[new SimpleObject(aRockMedium, 1,3, 0,1)], | [[new SimpleObject(aRockMedium, 1,3, 0,1)], | ||||
[new SimpleObject(aRockLarge, 1,2, 0,1), new SimpleObject(aRockMedium, 1,3, 0,2)], | [new SimpleObject(aRockLarge, 1,2, 0,1), new SimpleObject(aRockMedium, 1,3, 0,2)], | ||||
[new SimpleObject(aGrassShort, 1,2, 0,1, -PI/8,PI/8)], | [new SimpleObject(aGrassShort, 1,2, 0,1, -PI/8,PI/8)], | ||||
[new SimpleObject(aGrass, 2,4, 0,1.8, -PI/8,PI/8), new SimpleObject(aGrassShort, 3,6, 1.2,2.5, -PI/8,PI/8)], | [new SimpleObject(aGrass, 2,4, 0,1.8, -PI/8,PI/8), new SimpleObject(aGrassShort, 3,6, 1.2,2.5, -PI/8,PI/8)], | ||||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator