Replace Map.CustomTerrain radar colors with IRadarTerrainLayer.

* TSVeinsRenderer now shows border cells on the radar
* BuildableTerrainLayer now uses the radar colors defined on the individual tiles
* CliffBackImpassabilityLayer no longer overrides the underlying terrain color.
This commit is contained in:
Paul Chote
2021-08-20 18:43:22 +01:00
committed by abcdefg30
parent 72c0c7e38b
commit 7f94d67d39
11 changed files with 278 additions and 58 deletions

View File

@@ -12,6 +12,7 @@
using System.Collections.Generic;
using OpenRA.FileSystem;
using OpenRA.Primitives;
using OpenRA.Support;
using OpenRA.Traits;
namespace OpenRA
@@ -45,6 +46,14 @@ namespace OpenRA
public readonly byte RampType;
public readonly Color MinColor;
public readonly Color MaxColor;
public Color GetColor(MersenneTwister random)
{
if (MinColor != MaxColor)
return Exts.ColorLerp(random.NextFloat(), MinColor, MaxColor);
return MinColor;
}
}
public class TerrainTypeInfo