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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user