Rename Stance to PlayerRelationship
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user