Rename Stance to PlayerRelationship

This commit is contained in:
abcdefg30
2020-09-25 16:22:37 +02:00
committed by Paul Chote
parent 672172d1f1
commit eda9966d27
63 changed files with 111 additions and 111 deletions

View File

@@ -409,7 +409,7 @@ namespace OpenRA.Mods.Common.Traits
case BuildingType.Defense:
// Build near the closest enemy structure
var closestEnemy = world.ActorsHavingTrait<Building>().Where(a => !a.Disposed && player.Stances[a.Owner] == Stance.Enemy)
var closestEnemy = world.ActorsHavingTrait<Building>().Where(a => !a.Disposed && player.Stances[a.Owner] == PlayerRelationship.Enemy)
.ClosestTo(world.Map.CenterOfCell(baseBuilder.DefenseCenter));
var targetCell = closestEnemy != null ? closestEnemy.Location : baseCenter;

View File

@@ -118,7 +118,7 @@ namespace OpenRA.Mods.Common.Traits
public enum DecisionMetric { Health, Value, None }
[Desc("Against whom should this power be used?", "Allowed keywords: Ally, Neutral, Enemy")]
public readonly Stance Against = Stance.Enemy;
public readonly PlayerRelationship Against = PlayerRelationship.Enemy;
[Desc("What types should the desired targets of this power be?")]
public readonly BitSet<TargetableType> Types = new BitSet<TargetableType>("Air", "Ground", "Water");
@@ -138,7 +138,7 @@ namespace OpenRA.Mods.Common.Traits
}
/// <summary>Evaluates a single actor according to the rules defined in this consideration</summary>
public int GetAttractiveness(Actor a, Stance stance, Player firedBy)
public int GetAttractiveness(Actor a, PlayerRelationship stance, Player firedBy)
{
if (stance != Against)
return 0;
@@ -174,7 +174,7 @@ namespace OpenRA.Mods.Common.Traits
return 0;
}
public int GetAttractiveness(FrozenActor fa, Stance stance, Player firedBy)
public int GetAttractiveness(FrozenActor fa, PlayerRelationship stance, Player firedBy)
{
if (stance != Against)
return 0;