This commit adds watercliffs to generated maps in the RA mod, based on
the path partitioning logic added for the D2K map generator.
Watercliffs are not available in CnC and unofficial mods, so their use
in the ExperimentalMapGenerator configuration is optional.
The internal Vote method (called in a tight loop) was inefficient due
to expensive iteration and data structures, which meant that
attempting to generate larger maps could take days.
It is changed to leverage some shared pre-computation to reduce its
runtime complexity and replaces the use of Dictionary with a simple
reused array.
The semantics of the Vote method in isolation are slightly modified,
but this should not impact the quality of generated maps, especially
with current usage.
The TEMPERAT and SNOW tilesets' MultiBrush segment definitions used
inconsistent conventions for vertical and horizontal beaches. This
meant that:
- Tiling was biased to produce horizontally wider bodies of water.
- Vertical beaches did not line up with watercliffs when connecting.
This change redefines the point sequences to fix these issues.
Inner types in MultiBrush segment definitions can usually be derived
automatically from the start and end types. This is especially
important for segments with different starts and ends, where the Inner
type could be either one (e.g. beach to watercliff changers). Inner
types are now only needed in two cases:
- The Inner type doesn't match either the start or end. For example,
road diagonals.
- The Inner type should only match one of the start or the end. For
example, cliffs which end into clear tiles.
This commit cleans up the unneeded or unwanted Inner type definitions
in the base mods.
This fixes incorrect check in AllowResourceAt(), which previously looked at terrain type of the given cell *before* resource was created. Hence the check did not work as expected.