Make PlayerRelationShipColor static
This commit is contained in:
committed by
Matthias Mailänder
parent
fa0254cb27
commit
34262fb33c
@@ -127,7 +127,7 @@ namespace OpenRA.Mods.Common.Graphics
|
||||
Color GetHealthColor(IHealth health)
|
||||
{
|
||||
if (Game.Settings.Game.UsePlayerStanceColors)
|
||||
return actor.Owner.PlayerRelationshipColor(actor);
|
||||
return Player.PlayerRelationshipColor(actor);
|
||||
|
||||
return health.DamageState == DamageState.Critical ? Color.Red :
|
||||
health.DamageState == DamageState.Heavy ? Color.Yellow : Color.LimeGreen;
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace OpenRA.Mods.Common.Graphics
|
||||
Color GetHealthColor(IHealth health)
|
||||
{
|
||||
if (Game.Settings.Game.UsePlayerStanceColors)
|
||||
return actor.Owner.PlayerRelationshipColor(actor);
|
||||
return Player.PlayerRelationshipColor(actor);
|
||||
|
||||
return health.DamageState == DamageState.Critical ? Color.Red :
|
||||
health.DamageState == DamageState.Heavy ? Color.Yellow : Color.LimeGreen;
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace OpenRA.Mods.Common.Traits.Radar
|
||||
if (IsTraitDisabled || (viewer != null && !Info.ValidRelationships.HasRelationship(self.Owner.RelationshipWith(viewer))))
|
||||
return;
|
||||
|
||||
var color = Game.Settings.Game.UsePlayerStanceColors ? self.Owner.PlayerRelationshipColor(self) : self.Owner.Color;
|
||||
var color = Game.Settings.Game.UsePlayerStanceColors ? Player.PlayerRelationshipColor(self) : self.Owner.Color;
|
||||
if (modifier != null)
|
||||
color = modifier.RadarColorOverride(self, color);
|
||||
|
||||
|
||||
@@ -61,11 +61,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
var time = WidgetUtils.FormatTime(p.RemainingTicks, false, self.World.Timestep);
|
||||
var text = TranslationProvider.GetString(Format, Translation.Arguments("player", self.Owner.PlayerName, "support-power", p.Name, "time", time));
|
||||
|
||||
var playerColor = self.Owner.Color;
|
||||
|
||||
if (Game.Settings.Game.UsePlayerStanceColors)
|
||||
playerColor = self.Owner.PlayerRelationshipColor(self);
|
||||
|
||||
var playerColor = Game.Settings.Game.UsePlayerStanceColors ? Player.PlayerRelationshipColor(self) : self.Owner.Color;
|
||||
var color = !p.Ready || Game.LocalTick % 50 < 25 ? playerColor : Color.White;
|
||||
|
||||
return (text, color);
|
||||
|
||||
Reference in New Issue
Block a user