Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/maps/random/gear.js
RMS.LoadLibrary("rmgen"); | RMS.LoadLibrary("rmgen"); | ||||
TILE_CENTERED_HEIGHT_MAP = true; | TILE_CENTERED_HEIGHT_MAP = true; | ||||
//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 344 Lines • ▼ Show 20 Lines | |||||
else | else | ||||
createMountains(tCliff, avoidClasses(clPlayer, 20, clHill, 15, clWater, 2), clHill, scaleByMapSize(1, 4) * numPlayers); | createMountains(tCliff, avoidClasses(clPlayer, 20, clHill, 15, clWater, 2), clHill, scaleByMapSize(1, 4) * numPlayers); | ||||
createForests( | createForests( | ||||
[tMainTerrain, tForestFloor1, tForestFloor2, pForest1, pForest2], | [tMainTerrain, tForestFloor1, tForestFloor2, pForest1, pForest2], | ||||
avoidClasses(clPlayer, 20, clForest, 17, clHill, 0, clWater, 2), | avoidClasses(clPlayer, 20, clForest, 17, clHill, 0, clWater, 2), | ||||
clForest, | clForest, | ||||
1.0, | 1.0, | ||||
random_terrain | currentBiome() | ||||
); | ); | ||||
RMS.SetProgress(50); | RMS.SetProgress(50); | ||||
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)], | ||||
[[tMainTerrain,tTier1Terrain],[tTier1Terrain,tTier2Terrain], [tTier2Terrain,tTier3Terrain]], | [[tMainTerrain,tTier1Terrain],[tTier1Terrain,tTier2Terrain], [tTier2Terrain,tTier3Terrain]], | ||||
Show All 36 Lines | createObjectGroupsDeprecated( | ||||
scaleByMapSize(400, 2000), | scaleByMapSize(400, 2000), | ||||
100); | 100); | ||||
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 47 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator