Add CnC map generator support

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.
This commit is contained in:
Ashley Newson
2025-01-08 23:08:28 +00:00
committed by Gustas
parent bdc50899de
commit 2126f3c5a2
13 changed files with 4881 additions and 18 deletions

View File

@@ -126,7 +126,7 @@ namespace OpenRA.Mods.Common.MapGenerator
else if (!hasTiles && hasActorPlans)
return Replaceability.Actor;
else
throw new ArgumentException("MultiBrush has no tiles or actors");
return Replaceability.None;
}
/// <summary>
@@ -190,7 +190,10 @@ namespace OpenRA.Mods.Common.MapGenerator
foreach (var cpos in actorPlan.Footprint().Keys)
xys.Add(new CVec(cpos.X, cpos.Y));
shape = xys.OrderBy(xy => (xy.Y, xy.X)).ToArray();
if (xys.Count != 0)
shape = xys.OrderBy(xy => (xy.Y, xy.X)).ToArray();
else
shape = new[] { new CVec(0, 0) };
}
/// <summary>