Place map generator spawns more intuitively

The map generators previously placed spawns in an order that was
somewhat arbitrary and unintuitive to users.

This change provides and makes use of a Terraformer utility to reorder
spawns, based on their location, so that they typically make more
sense to users selecting spawns from a lobby.

Added to ExperimentalMapGenerator (RA, CnC), and D2kMapGenerator.

Note that as this changes the output of the map generator for a given
selection of settings. (Replays using generated maps from older
versions will lose compatibility and no longer load.)
This commit is contained in:
Ashley Newson
2026-01-03 01:52:03 +00:00
committed by Gustas Kažukauskas
parent 1300ecc18f
commit 2cf2d7eed7
3 changed files with 60 additions and 0 deletions

View File

@@ -947,6 +947,7 @@ namespace OpenRA.Mods.Common.Traits
// Cosmetically repaint tiles
terraformer.RepaintTiles(repaintRandom, param.RepaintTiles);
terraformer.ReorderPlayerSpawns();
terraformer.BakeMap();
return map;