Rename remaining Stance references to PlayerRelationship.
This commit is contained in:
@@ -167,7 +167,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
if (!Disguised || self.Owner.IsAlliedWith(self.World.RenderPlayer))
|
||||
return color;
|
||||
|
||||
return color = Game.Settings.Game.UsePlayerStanceColors ? AsPlayer.PlayerStanceColor(self) : AsPlayer.Color;
|
||||
return color = Game.Settings.Game.UsePlayerStanceColors ? AsPlayer.PlayerRelationshipColor(self) : AsPlayer.Color;
|
||||
}
|
||||
|
||||
public void DisguiseAs(Actor target)
|
||||
@@ -298,8 +298,8 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
public override bool CanTargetActor(Actor self, Actor target, TargetModifiers modifiers, ref string cursor)
|
||||
{
|
||||
var stance = self.Owner.RelationshipWith(target.Owner);
|
||||
if (!info.ValidRelationships.HasStance(stance))
|
||||
var relationship = self.Owner.RelationshipWith(target.Owner);
|
||||
if (!info.ValidRelationships.HasRelationship(relationship))
|
||||
return false;
|
||||
|
||||
return info.TargetTypes.Overlaps(target.GetAllTargetTypes());
|
||||
@@ -307,8 +307,8 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor)
|
||||
{
|
||||
var stance = self.Owner.RelationshipWith(target.Owner);
|
||||
if (!info.ValidRelationships.HasStance(stance))
|
||||
var relationship = self.Owner.RelationshipWith(target.Owner);
|
||||
if (!info.ValidRelationships.HasRelationship(relationship))
|
||||
return false;
|
||||
|
||||
return info.TargetTypes.Overlaps(target.Info.GetAllTargetTypes());
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
protected override bool ShouldRender(Actor self)
|
||||
{
|
||||
return infiltrators.Any(i => Info.ValidRelationships.HasStance(i.RelationshipWith(self.World.RenderPlayer)));
|
||||
return infiltrators.Any(i => Info.ValidRelationships.HasRelationship(i.RelationshipWith(self.World.RenderPlayer)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,10 +101,10 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
case TargetType.Actor:
|
||||
return Info.Types.Overlaps(target.Actor.GetEnabledTargetTypes()) &&
|
||||
Info.ValidRelationships.HasStance(self.Owner.RelationshipWith(target.Actor.Owner));
|
||||
Info.ValidRelationships.HasRelationship(self.Owner.RelationshipWith(target.Actor.Owner));
|
||||
case TargetType.FrozenActor:
|
||||
return target.FrozenActor.IsValid && Info.Types.Overlaps(target.FrozenActor.TargetTypes) &&
|
||||
Info.ValidRelationships.HasStance(self.Owner.RelationshipWith(target.FrozenActor.Owner));
|
||||
Info.ValidRelationships.HasRelationship(self.Owner.RelationshipWith(target.FrozenActor.Owner));
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@@ -136,7 +136,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
public override bool CanTargetActor(Actor self, Actor target, TargetModifiers modifiers, ref string cursor)
|
||||
{
|
||||
var stance = self.Owner.RelationshipWith(target.Owner);
|
||||
if (!info.ValidRelationships.HasStance(stance))
|
||||
if (!info.ValidRelationships.HasRelationship(stance))
|
||||
return false;
|
||||
|
||||
return info.Types.Overlaps(target.GetAllTargetTypes());
|
||||
@@ -145,7 +145,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor)
|
||||
{
|
||||
var stance = self.Owner.RelationshipWith(target.Owner);
|
||||
if (!info.ValidRelationships.HasStance(stance))
|
||||
if (!info.ValidRelationships.HasRelationship(stance))
|
||||
return false;
|
||||
|
||||
return info.Types.Overlaps(target.Info.GetAllTargetTypes());
|
||||
|
||||
Reference in New Issue
Block a user