Previously, only the RectangularIsometric case was handled, despite
this currently only being used in Rectangular mode. Additionally,
the calculation was slightly off.
Adds map generator support for CnC (all tilesets), largely on par with
RA.
Most tilesets do not have a complete set of beach templates and
therefore do not support terrain settings involving water. DESERT is the
only tileset supporting water. Unlike in RA, water is not playable space
in CnC (no naval units), so only terrain settings with small bodies of
water are available.
Most changes are configuration (tileset and map generator config), with
just a small number of code changes.
Updates the random map generator to produce more elaborate roads:
- Roads extend beyond map bounds.
- Shorter, unviable roads are pruned and merged to create longer roads.
- Roads can loop.
Use the covariant return type feature of C# 9 to allow method overrides to be more specific about their return type. By exposing this information, e.g. for Widget.Clone(), callers will have more information. This allows various casts to be removed as the information is now available within the type system.
Coastlines and cliffs at the edge of a map should have been getting
extended beyond the map edge help them tile reliably. This was not
happening due to a conditional that accidentally got inverted during a
refactor.
Fixing the conditional makes beach and cliff tiling significantly more
reliable. (Note that there is no effect on road tiling.)
Add an experimental procedural map generator for the Red Alert mod,
along with supporting code that may assist in the development of map
generators for other mods.
Map generation may be accessed as a tool in the Map Editor. This change
does not presently introduce direct lobby options for generated maps.
Features:
- Terrain with land, water, beaches, cliffs, roads, debris, and trees.
- Placement of mpspawns, neutral buildings, and resources.
- Rotational and mirror symmetry options.
- Various configurable parameters with presets.
- Deterministic with configurable seed.
- Performant.
Account for per-actor production (e.g. ProductionQueue) and per-player production (e.g. ClassicProductionQueue). This requires resolving the Production and ProductionQueue traits on both the producing actor, and the owning player actor.
When setting rally points, check the actor didn't die first.
If a unit is above the terrain, the shadow shouldn't display directly underneath the unit, it should take the height into account and display further down. This fix uses the same adjustment as applied by the WithShadow trait.
Previously, when running in windowed-mode on Windows, the threaded renderer would cause the minimize/restore behaviour to become unreliable. It was disabled under this configuration to avoid the problem.
This no longer occurs (perhaps fixed by an intervening SDL update?), so we can remove the workaround and always use the threaded renderer for a performance improvement.