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