Make player stance colours universally respected
This commit is contained in:
committed by
Matthias Mailänder
parent
2f331548e1
commit
5fc36bd45f
@@ -99,7 +99,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
public override object Create(ActorInitializer init) { return new Disguise(init.Self, this); }
|
||||
}
|
||||
|
||||
sealed class Disguise : IEffectiveOwner, IIssueOrder, IResolveOrder, IOrderVoice, IRadarColorModifier, INotifyAttack,
|
||||
sealed class Disguise : IEffectiveOwner, IIssueOrder, IResolveOrder, IOrderVoice, INotifyAttack,
|
||||
INotifyDamage, INotifyLoadCargo, INotifyUnloadCargo, INotifyDemolition, INotifyInfiltration, ITick
|
||||
{
|
||||
public ActorInfo AsActor { get; private set; }
|
||||
@@ -158,14 +158,6 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
return order.OrderString == "Disguise" ? info.Voice : null;
|
||||
}
|
||||
|
||||
Color IRadarColorModifier.RadarColorOverride(Actor self, Color color)
|
||||
{
|
||||
if (!Disguised || self.Owner.IsAlliedWith(self.World.RenderPlayer))
|
||||
return color;
|
||||
|
||||
return Game.Settings.Game.UsePlayerStanceColors ? Player.PlayerRelationshipColor(self) : AsPlayer.Color;
|
||||
}
|
||||
|
||||
public void DisguiseAs(Actor target)
|
||||
{
|
||||
var oldEffectiveActor = AsActor;
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
TextNotificationsManager.AddTransientLine(infiltrator.Owner, info.InfiltrationTextNotification);
|
||||
|
||||
if (info.ShowTicks)
|
||||
self.World.AddFrameEndTask(w => w.Add(new FloatingText(self.CenterPosition, infiltrator.Owner.Color, FloatingText.FormatCashTick(toGive), 30)));
|
||||
self.World.AddFrameEndTask(w => w.Add(new FloatingText(self.CenterPosition, infiltrator.OwnerColor(), FloatingText.FormatCashTick(toGive), 30)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
var temp = currentDisplayValue;
|
||||
if (self.Owner.IsAlliedWith(self.World.RenderPlayer))
|
||||
self.World.AddFrameEndTask(w => w.Add(new FloatingText(self.CenterPosition, self.Owner.Color, FloatingText.FormatCashTick(temp), Info.TickLifetime)));
|
||||
self.World.AddFrameEndTask(w => w.Add(new FloatingText(self.CenterPosition, self.OwnerColor(), FloatingText.FormatCashTick(temp), Info.TickLifetime)));
|
||||
|
||||
currentDisplayTick = Info.TickRate;
|
||||
currentDisplayValue = 0;
|
||||
|
||||
Reference in New Issue
Block a user