HomeWildfire Games

Obliterate Unknown (rP12545), Unknown Land (rP12654) and Unknown Nomad…

Description

Obliterate Unknown (rP12545), Unknown Land (rP12654) and Unknown Nomad (rP12747) triplication of doom, fixes #4317.

Refactor by moving from procedural programming to functional programming.
Fix the horrendous shoreline performance bug on "Continent" of Unknown as in rP14162 by dropping the historic differences between the maps.

Remove misleading player coordinate computation when generating the terrain on Unknown Nomad, because the players are spawned elsewhere then.
Remove names like md, mdd1 and mdd2 with different connotations in every landscape type.
Remove six more paintRiver copies in the "Edge Seas" variant as in rP20185.
Remove createShoreJaggedness and createExtensionsOrIslands duplication within this triplication.
Remove heightmap initialization octuplication by adding initHeight.
Remove horizontal/vertical duplication by using logical operators.
Remove Painters redundant with the paintTerrainBasedOnHeight calls, pointless comments and cleanup createArea calls as in rP20301.
Remove some forest helper duplication as in rP20406.
Remove references to Math proxies and use the prototype functions directly.
Remove whitespace issues.

Describe remaining calls with human-readable log messages.
Always spawn enough treasures for a CC (instead of sometimes only giving enough for a dock), refs rP16447.
Generate "Mainland" variant with the same probability as the other landscape types.
Generate "Central Sea" variant on Unknown Land too by forcing an Isthmus then.
Don't split players on Unknown Nomad on the "Rivers And Lake" variation, because the resource imbalance is too drastic.
Consistently call markPlayerArea before terrain generation on non-Nomad maps.

Differential Revision: https://code.wildfiregames.com/D252