Implement player stance colors

Adds an option to display actors on radar and
support weapon timers in colors denoting the
diplomatic stance toward the player.
This commit is contained in:
DArcy Rush
2015-10-29 15:06:51 +00:00
committed by Oliver Brakmann
parent ce8b03a276
commit eb795909da
17 changed files with 97 additions and 40 deletions

View File

@@ -40,7 +40,9 @@ namespace OpenRA.Mods.Common.Traits
public IEnumerable<Pair<CPos, Color>> RadarSignatureCells(Actor self)
{
var color = modifier != null ? modifier.RadarColorOverride(self) : self.Owner.Color.RGB;
var color = Game.Settings.Game.UsePlayerStanceColors ? self.Owner.PlayerStanceColor(self) : self.Owner.Color.RGB;
if (modifier != null)
color = modifier.RadarColorOverride(self, color);
if (info.UseLocation)
return new[] { Pair.New(self.Location, color) };