Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/maps/random/belgian_uplands.js
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | for (let x = 0; x < mapSize; ++x) | ||||
{ | { | ||||
let position = new Vector2D(x, y); | let position = new Vector2D(x, y); | ||||
if (!g_Map.validHeight(position)) | if (!g_Map.validHeight(position)) | ||||
continue; | continue; | ||||
var textureMinHeight = heightRange.min; | var textureMinHeight = heightRange.min; | ||||
for (var i = 0; i < textueByHeight.length; i++) | for (var i = 0; i < textueByHeight.length; i++) | ||||
{ | { | ||||
if (g_Map.getHeight(position) >= textureMinHeight && g_Map.getHeight(position) <= textueByHeight[i].upperHeightLimit) | if (g_Map.getVertexHeight(position) >= textureMinHeight && g_Map.getVertexHeight(position) <= textueByHeight[i].upperHeightLimit) | ||||
{ | { | ||||
createTerrain(textueByHeight[i].terrain).place(position); | createTerrain(textueByHeight[i].terrain).place(position); | ||||
let template; | let template; | ||||
if (i == 0) // ...deep water | if (i == 0) // ...deep water | ||||
{ | { | ||||
if (randBool(propDensity / 100)) | if (randBool(propDensity / 100)) | ||||
▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator