Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/maps/random/unknown.js
Engine.LoadLibrary("rmgen"); | Engine.LoadLibrary("rmgen"); | ||||
Engine.LoadLibrary("rmgen-common"); | Engine.LoadLibrary("rmgen-common"); | ||||
Engine.LoadLibrary("rmbiome"); | Engine.LoadLibrary("rmbiome"); | ||||
TILE_CENTERED_HEIGHT_MAP = true; | |||||
setSelectedBiome(); | setSelectedBiome(); | ||||
const tMainTerrain = g_Terrains.mainTerrain; | const tMainTerrain = g_Terrains.mainTerrain; | ||||
const tForestFloor1 = g_Terrains.forestFloor1; | const tForestFloor1 = g_Terrains.forestFloor1; | ||||
const tForestFloor2 = g_Terrains.forestFloor2; | const tForestFloor2 = g_Terrains.forestFloor2; | ||||
const tCliff = g_Terrains.cliff; | const tCliff = g_Terrains.cliff; | ||||
const tTier1Terrain = g_Terrains.tier1Terrain; | const tTier1Terrain = g_Terrains.tier1Terrain; | ||||
const tTier2Terrain = g_Terrains.tier2Terrain; | const tTier2Terrain = g_Terrains.tier2Terrain; | ||||
▲ Show 20 Lines • Show All 278 Lines • ▼ Show 20 Lines | paintRiver({ | ||||
"heightLand": heightLand, | "heightLand": heightLand, | ||||
"meanderShort": 20, | "meanderShort": 20, | ||||
"meanderLong": 0, | "meanderLong": 0, | ||||
"waterFunc": (position, height, riverFraction) => { | "waterFunc": (position, height, riverFraction) => { | ||||
if (height < 0) | if (height < 0) | ||||
clWater.add(position); | clWater.add(position); | ||||
}, | }, | ||||
"landFunc": (position, shoreDist1, shoreDist2) => { | "landFunc": (position, shoreDist1, shoreDist2) => { | ||||
g_Map.setHeight(position, 3.1); | g_Map.setVertexHeight(position, 3.1); | ||||
clLand.add(position); | clLand.add(position); | ||||
} | } | ||||
}); | }); | ||||
if (!isNomad()) | if (!isNomad()) | ||||
{ | { | ||||
[playerIDs, playerPosition] = playerPlacementRiver(startAngle + Math.PI / 2, fractionToTiles(0.6)); | [playerIDs, playerPosition] = playerPlacementRiver(startAngle + Math.PI / 2, fractionToTiles(0.6)); | ||||
markPlayerArea("small"); | markPlayerArea("small"); | ||||
▲ Show 20 Lines • Show All 769 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator