HomeWildfire Games

Cleanup most createArea and some createObjectGroup calls in random map scripts.

Description

Cleanup most createArea and some createObjectGroup calls in random map scripts.

Inline the placer, terrainPainter, elevationPainter, group and sizes helper variables that are used only once.
Thus do not hoist variable declarations from unrelated scopes.
Remove few dozens of painters that are overpainted by the paintBasedOnTerrainHeight call afterwards.
Remove 334 noisy misaligned code comments ( terrains widths blend radius and some variation).
Label the createArea calls so that the reader knows what they do.
Remove unbenefitial Math.PI/8 grass min/max angle limitation.
Use height variables for the SmoothElevationPainter calls so that levels can be modified more easily.
Use Math prototype functions instead of the unfortunate rmgen proxies.
Does not touch starting base code, Unknown maps, Snowflake Searocks and Corsica & Sardinia which need special treatment.

Details

Event Timeline

elexis added inline comments.Oct 17 2017, 1:14 AM
/ps/trunk/binaries/data/mods/public/maps/random/rmbiome/randombiome.js
17

Oh, I committed that.

Since the gamesetup choses the random biome now, the selectRandomBiome function was removed from the library.
But atlas has no biome dropdown, so it complained each time about the Biome being undefined.