Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/maps/random/rmgen2/gaia.js
Show First 20 Lines • Show All 104 Lines • ▼ Show 20 Lines | for (let i = 0; i < fill * 15; ++i) | ||||
// Pick a random bluff location and shape | // Pick a random bluff location and shape | ||||
let areasBluff = createAreas( | let areasBluff = createAreas( | ||||
new ChainPlacer(5 * bluffDeviation, 7 * bluffDeviation, 100 * bluffDeviation, 0.5), | new ChainPlacer(5 * bluffDeviation, 7 * bluffDeviation, 100 * bluffDeviation, 0.5), | ||||
undefined, | undefined, | ||||
constraint, | constraint, | ||||
1); | 1); | ||||
if (!areasBluff.length) | if (!areasBluff.length || !areasBluff[0].getPoints().length) | ||||
continue; | continue; | ||||
// Get a random starting position for the baseline and the endline | // Get a random starting position for the baseline and the endline | ||||
let angle = randIntInclusive(0, 3); | let angle = randIntInclusive(0, 3); | ||||
let opposingAngle = (angle + 2) % 4; | let opposingAngle = (angle + 2) % 4; | ||||
// Find the edges of the bluff | // Find the edges of the bluff | ||||
let baseLine; | let baseLine; | ||||
▲ Show 20 Lines • Show All 1,029 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator