diff --git a/OpenRA.Mods.Cnc/Traits/Disguise.cs b/OpenRA.Mods.Cnc/Traits/Disguise.cs index 3e76387438..5d261f98dc 100644 --- a/OpenRA.Mods.Cnc/Traits/Disguise.cs +++ b/OpenRA.Mods.Cnc/Traits/Disguise.cs @@ -79,8 +79,8 @@ namespace OpenRA.Mods.Cnc.Traits [Desc("The condition to grant to self while disguised.")] public readonly string DisguisedCondition = null; - [Desc("What diplomatic stances can this actor disguise as.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Ally | PlayerRelationship.Neutral | PlayerRelationship.Enemy; + [Desc("Player relationships the owner of the disguise target needs.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Ally | PlayerRelationship.Neutral | PlayerRelationship.Enemy; [Desc("Target types of actors that this actor disguise as.")] public readonly BitSet TargetTypes = new BitSet("Disguise"); @@ -299,7 +299,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.ValidStances.HasStance(stance)) + if (!info.ValidRelationships.HasStance(stance)) return false; return info.TargetTypes.Overlaps(target.GetAllTargetTypes()); @@ -308,7 +308,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.ValidStances.HasStance(stance)) + if (!info.ValidRelationships.HasStance(stance)) return false; return info.TargetTypes.Overlaps(target.Info.GetAllTargetTypes()); diff --git a/OpenRA.Mods.Cnc/Traits/Infiltration/InfiltrateForDecoration.cs b/OpenRA.Mods.Cnc/Traits/Infiltration/InfiltrateForDecoration.cs index 82a02031ea..2c60684125 100644 --- a/OpenRA.Mods.Cnc/Traits/Infiltration/InfiltrateForDecoration.cs +++ b/OpenRA.Mods.Cnc/Traits/Infiltration/InfiltrateForDecoration.cs @@ -48,7 +48,7 @@ namespace OpenRA.Mods.Cnc.Traits protected override bool ShouldRender(Actor self) { - return infiltrators.Any(i => Info.ValidStances.HasStance(i.RelationshipWith(self.World.RenderPlayer))); + return infiltrators.Any(i => Info.ValidRelationships.HasStance(i.RelationshipWith(self.World.RenderPlayer))); } } } diff --git a/OpenRA.Mods.Cnc/Traits/Infiltration/Infiltrates.cs b/OpenRA.Mods.Cnc/Traits/Infiltration/Infiltrates.cs index 16af5fa5e7..080d4bb3f7 100644 --- a/OpenRA.Mods.Cnc/Traits/Infiltration/Infiltrates.cs +++ b/OpenRA.Mods.Cnc/Traits/Infiltration/Infiltrates.cs @@ -30,8 +30,8 @@ namespace OpenRA.Mods.Cnc.Traits [Desc("Color to use for the target line.")] public readonly Color TargetLineColor = Color.Crimson; - [Desc("What diplomatic stances can be infiltrated by this actor.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Neutral | PlayerRelationship.Enemy; + [Desc("Player relationships the owner of the infiltration target needs.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Neutral | PlayerRelationship.Enemy; [Desc("Behaviour when entering the target.", "Possible values are Exit, Suicide, Dispose.")] @@ -101,10 +101,10 @@ namespace OpenRA.Mods.Cnc.Traits { case TargetType.Actor: return Info.Types.Overlaps(target.Actor.GetEnabledTargetTypes()) && - Info.ValidStances.HasStance(self.Owner.RelationshipWith(target.Actor.Owner)); + Info.ValidRelationships.HasStance(self.Owner.RelationshipWith(target.Actor.Owner)); case TargetType.FrozenActor: return target.FrozenActor.IsValid && Info.Types.Overlaps(target.FrozenActor.TargetTypes) && - Info.ValidStances.HasStance(self.Owner.RelationshipWith(target.FrozenActor.Owner)); + Info.ValidRelationships.HasStance(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.ValidStances.HasStance(stance)) + if (!info.ValidRelationships.HasStance(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.ValidStances.HasStance(stance)) + if (!info.ValidRelationships.HasStance(stance)) return false; return info.Types.Overlaps(target.Info.GetAllTargetTypes()); diff --git a/OpenRA.Mods.Common/Activities/CaptureActor.cs b/OpenRA.Mods.Common/Activities/CaptureActor.cs index 0bd92fa355..0bf9db924f 100644 --- a/OpenRA.Mods.Common/Activities/CaptureActor.cs +++ b/OpenRA.Mods.Common/Activities/CaptureActor.cs @@ -124,7 +124,7 @@ namespace OpenRA.Mods.Common.Activities foreach (var t in enterActor.TraitsImplementing()) t.OnCapture(enterActor, self, oldOwner, self.Owner, captures.Info.CaptureTypes); - if (self.Owner.RelationshipWith(oldOwner).HasStance(captures.Info.PlayerExperienceStances)) + if (self.Owner.RelationshipWith(oldOwner).HasStance(captures.Info.PlayerExperienceRelationships)) self.Owner.PlayerActor.TraitOrDefault()?.GiveExperience(captures.Info.PlayerExperience); if (captures.Info.ConsumedByCapture) diff --git a/OpenRA.Mods.Common/Activities/RepairBuilding.cs b/OpenRA.Mods.Common/Activities/RepairBuilding.cs index 0b48b1b9bd..f997b844c3 100644 --- a/OpenRA.Mods.Common/Activities/RepairBuilding.cs +++ b/OpenRA.Mods.Common/Activities/RepairBuilding.cs @@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.Activities // Make sure we can still repair the target before entering // (but not before, because this may stop the actor in the middle of nowhere) var stance = self.Owner.RelationshipWith(enterActor.Owner); - if (enterHealth == null || enterHealth.DamageState == DamageState.Undamaged || enterEngineerRepariable == null || enterEngineerRepariable.IsTraitDisabled || !info.ValidStances.HasStance(stance)) + if (enterHealth == null || enterHealth.DamageState == DamageState.Undamaged || enterEngineerRepariable == null || enterEngineerRepariable.IsTraitDisabled || !info.ValidRelationships.HasStance(stance)) { Cancel(self, true); return false; @@ -61,7 +61,7 @@ namespace OpenRA.Mods.Common.Activities return; var stance = self.Owner.RelationshipWith(enterActor.Owner); - if (!info.ValidStances.HasStance(stance)) + if (!info.ValidRelationships.HasStance(stance)) return; if (enterHealth.DamageState == DamageState.Undamaged) diff --git a/OpenRA.Mods.Common/Projectiles/Bullet.cs b/OpenRA.Mods.Common/Projectiles/Bullet.cs index ba0450cd63..f2a35ad808 100644 --- a/OpenRA.Mods.Common/Projectiles/Bullet.cs +++ b/OpenRA.Mods.Common/Projectiles/Bullet.cs @@ -96,8 +96,8 @@ namespace OpenRA.Mods.Common.Projectiles [Desc("Terrain where the projectile explodes instead of bouncing.")] public readonly HashSet InvalidBounceTerrain = new HashSet(); - [Desc("If projectile touches an actor with one of these stances during or after the first bounce, trigger explosion.")] - public readonly PlayerRelationship ValidBounceBlockerStances = PlayerRelationship.Enemy | PlayerRelationship.Neutral; + [Desc("Trigger the explosion if the projectile touches an actor thats owner has these player relationships.")] + public readonly PlayerRelationship ValidBounceBlockerRelationships = PlayerRelationship.Enemy | PlayerRelationship.Neutral; [Desc("Altitude above terrain below which to explode. Zero effectively deactivates airburst.")] public readonly WDist AirburstAltitude = WDist.Zero; @@ -319,7 +319,7 @@ namespace OpenRA.Mods.Common.Projectiles if (checkTargetType && !Target.FromActor(victim).IsValidFor(firedBy)) continue; - if (!info.ValidBounceBlockerStances.HasStance(firedBy.Owner.RelationshipWith(victim.Owner))) + if (!info.ValidBounceBlockerRelationships.HasStance(firedBy.Owner.RelationshipWith(victim.Owner))) continue; // If the impact position is within any actor's HitShape, we have a direct hit diff --git a/OpenRA.Mods.Common/Traits/AcceptsDeliveredCash.cs b/OpenRA.Mods.Common/Traits/AcceptsDeliveredCash.cs index 4926570345..e1a45de0ee 100644 --- a/OpenRA.Mods.Common/Traits/AcceptsDeliveredCash.cs +++ b/OpenRA.Mods.Common/Traits/AcceptsDeliveredCash.cs @@ -20,8 +20,8 @@ namespace OpenRA.Mods.Common.Traits [Desc("Accepted `DeliversCash` types. Leave empty to accept all types.")] public readonly HashSet ValidTypes = new HashSet(); - [Desc("Stance the delivering actor needs to enter.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Ally; + [Desc("Player relationships the owner of the delivering actor needs.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Ally; [Desc("Play a randomly selected sound from this list when accepting cash.")] public readonly string[] Sounds = { }; @@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.Traits public class AcceptsDeliveredCash : INotifyCashTransfer { - AcceptsDeliveredCashInfo info; + readonly AcceptsDeliveredCashInfo info; public AcceptsDeliveredCash(Actor self, AcceptsDeliveredCashInfo info) { diff --git a/OpenRA.Mods.Common/Traits/AcceptsDeliveredExperience.cs b/OpenRA.Mods.Common/Traits/AcceptsDeliveredExperience.cs index 4db51a7ed0..e45a43252a 100644 --- a/OpenRA.Mods.Common/Traits/AcceptsDeliveredExperience.cs +++ b/OpenRA.Mods.Common/Traits/AcceptsDeliveredExperience.cs @@ -20,8 +20,8 @@ namespace OpenRA.Mods.Common.Traits [Desc("Accepted `DeliversExperience` types. Leave empty to accept all types.")] public readonly HashSet ValidTypes = new HashSet(); - [Desc("Stance the delivering actor needs to enter.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Ally; + [Desc("Player relationships the owner of the delivering actor needs.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Ally; public override object Create(ActorInitializer init) { return new AcceptsDeliveredExperience(init.Self, this); } } diff --git a/OpenRA.Mods.Common/Traits/Armament.cs b/OpenRA.Mods.Common/Traits/Armament.cs index 8014d864ea..33912ecf39 100644 --- a/OpenRA.Mods.Common/Traits/Armament.cs +++ b/OpenRA.Mods.Common/Traits/Armament.cs @@ -68,8 +68,8 @@ namespace OpenRA.Mods.Common.Traits public WeaponInfo WeaponInfo { get; private set; } public WDist ModifiedRange { get; private set; } - public readonly PlayerRelationship TargetStances = PlayerRelationship.Enemy; - public readonly PlayerRelationship ForceTargetStances = PlayerRelationship.Enemy | PlayerRelationship.Neutral | PlayerRelationship.Ally; + public readonly PlayerRelationship TargetRelationships = PlayerRelationship.Enemy; + public readonly PlayerRelationship ForceTargetRelationships = PlayerRelationship.Enemy | PlayerRelationship.Neutral | PlayerRelationship.Ally; // TODO: instead of having multiple Armaments and unique AttackBase, // an actor should be able to have multiple AttackBases with diff --git a/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs b/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs index b6ee7d0d57..3047d04f06 100644 --- a/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs +++ b/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs @@ -377,7 +377,7 @@ namespace OpenRA.Mods.Common.Traits return Armaments.Where(a => !a.IsTraitDisabled - && (owner == null || (forceAttack ? a.Info.ForceTargetStances : a.Info.TargetStances).HasStance(self.Owner.RelationshipWith(owner))) + && (owner == null || (forceAttack ? a.Info.ForceTargetRelationships : a.Info.TargetRelationships).HasStance(self.Owner.RelationshipWith(owner))) && a.Weapon.IsValidAgainst(t, self.World, self)); } @@ -408,7 +408,7 @@ namespace OpenRA.Mods.Common.Traits var stances = PlayerRelationship.None; foreach (var armament in Armaments) if (!armament.IsTraitDisabled) - stances |= armament.Info.TargetStances; + stances |= armament.Info.TargetRelationships; return stances; } diff --git a/OpenRA.Mods.Common/Traits/AutoTarget.cs b/OpenRA.Mods.Common/Traits/AutoTarget.cs index 30a6d121ac..3dec00de01 100644 --- a/OpenRA.Mods.Common/Traits/AutoTarget.cs +++ b/OpenRA.Mods.Common/Traits/AutoTarget.cs @@ -326,7 +326,7 @@ namespace OpenRA.Mods.Common.Traits return activeTargetPriorities.Any(ati => { // Incompatible stances - if (!ati.ValidStances.HasStance(self.Owner.RelationshipWith(owner))) + if (!ati.ValidRelationships.HasStance(self.Owner.RelationshipWith(owner))) return false; // Incompatible target types @@ -391,7 +391,7 @@ namespace OpenRA.Mods.Common.Traits return false; // Incompatible stances - if (!ati.ValidStances.HasStance(self.Owner.RelationshipWith(owner))) + if (!ati.ValidRelationships.HasStance(self.Owner.RelationshipWith(owner))) return false; // Incompatible target types diff --git a/OpenRA.Mods.Common/Traits/AutoTargetPriority.cs b/OpenRA.Mods.Common/Traits/AutoTargetPriority.cs index 4af813a759..82da8fe82b 100644 --- a/OpenRA.Mods.Common/Traits/AutoTargetPriority.cs +++ b/OpenRA.Mods.Common/Traits/AutoTargetPriority.cs @@ -23,8 +23,8 @@ namespace OpenRA.Mods.Common.Traits [Desc("Target types that can't be AutoTargeted.", "Overrules ValidTargets.")] public readonly BitSet InvalidTargets; - [Desc("Stances between actor's and target's owner which can be AutoTargeted.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Ally | PlayerRelationship.Neutral | PlayerRelationship.Enemy; + [Desc("Relationships between actor's and target's owner needed for AutoTargeting.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Ally | PlayerRelationship.Neutral | PlayerRelationship.Enemy; [Desc("ValidTargets with larger priorities will be AutoTargeted before lower priorities.")] public readonly int Priority = 1; diff --git a/OpenRA.Mods.Common/Traits/BotModules/CaptureManagerBotModule.cs b/OpenRA.Mods.Common/Traits/BotModules/CaptureManagerBotModule.cs index 68d1752b43..c58bdde86a 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/CaptureManagerBotModule.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/CaptureManagerBotModule.cs @@ -37,8 +37,8 @@ namespace OpenRA.Mods.Common.Traits [Desc("Should visibility (Shroud, Fog, Cloak, etc) be considered when searching for capturable targets?")] public readonly bool CheckCaptureTargetsForVisibility = true; - [Desc("Player stances that capturers should attempt to target.")] - public readonly PlayerRelationship CapturableStances = PlayerRelationship.Enemy | PlayerRelationship.Neutral; + [Desc("Player relationships that capturers should attempt to target.")] + public readonly PlayerRelationship CapturableRelationships = PlayerRelationship.Enemy | PlayerRelationship.Neutral; public override object Create(ActorInitializer init) { return new CaptureManagerBotModule(init.Self, this); } } @@ -133,7 +133,7 @@ namespace OpenRA.Mods.Common.Traits return; var randPlayer = world.Players.Where(p => !p.Spectating - && Info.CapturableStances.HasStance(player.RelationshipWith(p))).Random(world.LocalRandom); + && Info.CapturableRelationships.HasStance(player.RelationshipWith(p))).Random(world.LocalRandom); var targetOptions = Info.CheckCaptureTargetsForVisibility ? GetVisibleActorsBelongingToPlayer(randPlayer) diff --git a/OpenRA.Mods.Common/Traits/Capturable.cs b/OpenRA.Mods.Common/Traits/Capturable.cs index 0a18a4050b..dabcbc3814 100644 --- a/OpenRA.Mods.Common/Traits/Capturable.cs +++ b/OpenRA.Mods.Common/Traits/Capturable.cs @@ -22,8 +22,8 @@ namespace OpenRA.Mods.Common.Traits [Desc("CaptureTypes (from the Captures trait) that are able to capture this.")] public readonly BitSet Types = default(BitSet); - [Desc("What diplomatic stances can be captured by this actor.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Neutral | PlayerRelationship.Enemy; + [Desc("What player relationships the target's owner needs to be captured by this actor.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Neutral | PlayerRelationship.Enemy; [Desc("Cancel the actor's current activity when getting captured.")] public readonly bool CancelActivity = false; diff --git a/OpenRA.Mods.Common/Traits/CaptureManager.cs b/OpenRA.Mods.Common/Traits/CaptureManager.cs index 0126f18e6b..0ebf7a24f4 100644 --- a/OpenRA.Mods.Common/Traits/CaptureManager.cs +++ b/OpenRA.Mods.Common/Traits/CaptureManager.cs @@ -50,7 +50,7 @@ namespace OpenRA.Mods.Common.Traits // Actors with FrozenUnderFog should therefore not disable the Capturable trait. var stance = captor.Owner.RelationshipWith(frozenActor.Owner); return frozenActor.Info.TraitInfos() - .Any(c => c.ValidStances.HasStance(stance) && captures.Info.CaptureTypes.Overlaps(c.Types)); + .Any(c => c.ValidRelationships.HasStance(stance) && captures.Info.CaptureTypes.Overlaps(c.Types)); } } @@ -108,13 +108,13 @@ namespace OpenRA.Mods.Common.Traits allyCapturableTypes = neutralCapturableTypes = enemyCapturableTypes = default(BitSet); foreach (var c in enabledCapturable) { - if (c.Info.ValidStances.HasStance(PlayerRelationship.Ally)) + if (c.Info.ValidRelationships.HasStance(PlayerRelationship.Ally)) allyCapturableTypes = allyCapturableTypes.Union(c.Info.Types); - if (c.Info.ValidStances.HasStance(PlayerRelationship.Neutral)) + if (c.Info.ValidRelationships.HasStance(PlayerRelationship.Neutral)) neutralCapturableTypes = neutralCapturableTypes.Union(c.Info.Types); - if (c.Info.ValidStances.HasStance(PlayerRelationship.Enemy)) + if (c.Info.ValidRelationships.HasStance(PlayerRelationship.Enemy)) enemyCapturableTypes = enemyCapturableTypes.Union(c.Info.Types); } } diff --git a/OpenRA.Mods.Common/Traits/Captures.cs b/OpenRA.Mods.Common/Traits/Captures.cs index 573c5faa4d..309a9a3d69 100644 --- a/OpenRA.Mods.Common/Traits/Captures.cs +++ b/OpenRA.Mods.Common/Traits/Captures.cs @@ -43,8 +43,8 @@ namespace OpenRA.Mods.Common.Traits [Desc("Experience granted to the capturing player.")] public readonly int PlayerExperience = 0; - [Desc("Stance that the structure's previous owner needs to have for the capturing player to receive Experience.")] - public readonly PlayerRelationship PlayerExperienceStances = PlayerRelationship.Enemy; + [Desc("Relationships that the structure's previous owner needs to have for the capturing player to receive Experience.")] + public readonly PlayerRelationship PlayerExperienceRelationships = PlayerRelationship.Enemy; [Desc("Cursor to display when the health of the target actor is above the sabotage threshold.")] public readonly string SabotageCursor = "capture"; diff --git a/OpenRA.Mods.Common/Traits/Conditions/ProximityExternalCondition.cs b/OpenRA.Mods.Common/Traits/Conditions/ProximityExternalCondition.cs index fabaec49b8..1f2b727db0 100644 --- a/OpenRA.Mods.Common/Traits/Conditions/ProximityExternalCondition.cs +++ b/OpenRA.Mods.Common/Traits/Conditions/ProximityExternalCondition.cs @@ -30,8 +30,8 @@ namespace OpenRA.Mods.Common.Traits "Ignored if 0 (actors are selected regardless of vertical distance).")] public readonly WDist MaximumVerticalOffset = WDist.Zero; - [Desc("What diplomatic stances are affected.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Ally; + [Desc("What player relationships are affected.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Ally; [Desc("Condition is applied permanently to this actor.")] public readonly bool AffectsParent = false; @@ -111,7 +111,7 @@ namespace OpenRA.Mods.Common.Traits return; var stance = self.Owner.RelationshipWith(a.Owner); - if (!Info.ValidStances.HasStance(stance)) + if (!Info.ValidRelationships.HasStance(stance)) return; var external = a.TraitsImplementing() @@ -135,7 +135,7 @@ namespace OpenRA.Mods.Common.Traits if ((produced.CenterPosition - self.CenterPosition).HorizontalLengthSquared <= Info.Range.LengthSquared) { var stance = self.Owner.RelationshipWith(produced.Owner); - if (!Info.ValidStances.HasStance(stance)) + if (!Info.ValidRelationships.HasStance(stance)) return; var external = produced.TraitsImplementing() diff --git a/OpenRA.Mods.Common/Traits/CreatesShroud.cs b/OpenRA.Mods.Common/Traits/CreatesShroud.cs index 306771b3c1..d3286a8928 100644 --- a/OpenRA.Mods.Common/Traits/CreatesShroud.cs +++ b/OpenRA.Mods.Common/Traits/CreatesShroud.cs @@ -17,8 +17,8 @@ namespace OpenRA.Mods.Common.Traits { public class CreatesShroudInfo : AffectsShroudInfo { - [Desc("Stance the watching player needs to see the generated shroud.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Neutral | PlayerRelationship.Enemy; + [Desc("Relationship the watching player needs to see the generated shroud.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Neutral | PlayerRelationship.Enemy; public override object Create(ActorInitializer init) { return new CreatesShroud(init.Self, this); } } @@ -43,7 +43,7 @@ namespace OpenRA.Mods.Common.Traits protected override void AddCellsToPlayerShroud(Actor self, Player p, PPos[] uv) { - if (!info.ValidStances.HasStance(self.Owner.RelationshipWith(p))) + if (!info.ValidRelationships.HasStance(self.Owner.RelationshipWith(p))) return; p.Shroud.AddSource(this, Shroud.SourceType.Shroud, uv); diff --git a/OpenRA.Mods.Common/Traits/DeliversCash.cs b/OpenRA.Mods.Common/Traits/DeliversCash.cs index 4d3a7c35b0..deb8b2a7a3 100644 --- a/OpenRA.Mods.Common/Traits/DeliversCash.cs +++ b/OpenRA.Mods.Common/Traits/DeliversCash.cs @@ -99,7 +99,7 @@ namespace OpenRA.Mods.Common.Traits public override bool CanTargetActor(Actor self, Actor target, TargetModifiers modifiers, ref string cursor) { var targetInfo = target.Info.TraitInfoOrDefault(); - if (targetInfo == null || !targetInfo.ValidStances.HasStance(target.Owner.RelationshipWith(self.Owner))) + if (targetInfo == null || !targetInfo.ValidRelationships.HasStance(target.Owner.RelationshipWith(self.Owner))) return false; if (targetInfo.ValidTypes.Count == 0) @@ -112,7 +112,7 @@ namespace OpenRA.Mods.Common.Traits public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { var targetInfo = target.Info.TraitInfoOrDefault(); - if (targetInfo == null || !targetInfo.ValidStances.HasStance(target.Owner.RelationshipWith(self.Owner))) + if (targetInfo == null || !targetInfo.ValidRelationships.HasStance(target.Owner.RelationshipWith(self.Owner))) return false; if (targetInfo.ValidTypes.Count == 0) diff --git a/OpenRA.Mods.Common/Traits/DeliversExperience.cs b/OpenRA.Mods.Common/Traits/DeliversExperience.cs index 44bd78620a..9c1e9b4503 100644 --- a/OpenRA.Mods.Common/Traits/DeliversExperience.cs +++ b/OpenRA.Mods.Common/Traits/DeliversExperience.cs @@ -109,7 +109,7 @@ namespace OpenRA.Mods.Common.Traits return false; var targetInfo = target.Info.TraitInfoOrDefault(); - if (targetInfo == null || !targetInfo.ValidStances.HasStance(target.Owner.RelationshipWith(self.Owner))) + if (targetInfo == null || !targetInfo.ValidRelationships.HasStance(target.Owner.RelationshipWith(self.Owner))) return false; if (targetInfo.ValidTypes.Count == 0) @@ -129,7 +129,7 @@ namespace OpenRA.Mods.Common.Traits return false; var targetInfo = target.Info.TraitInfoOrDefault(); - if (targetInfo == null || !targetInfo.ValidStances.HasStance(target.Owner.RelationshipWith(self.Owner))) + if (targetInfo == null || !targetInfo.ValidRelationships.HasStance(target.Owner.RelationshipWith(self.Owner))) return false; if (targetInfo.ValidTypes.Count == 0) diff --git a/OpenRA.Mods.Common/Traits/Demolition.cs b/OpenRA.Mods.Common/Traits/Demolition.cs index 4374bb7020..488ee75b7c 100644 --- a/OpenRA.Mods.Common/Traits/Demolition.cs +++ b/OpenRA.Mods.Common/Traits/Demolition.cs @@ -47,8 +47,8 @@ namespace OpenRA.Mods.Common.Traits [Desc("Color to use for the target line.")] public readonly Color TargetLineColor = Color.Crimson; - public readonly PlayerRelationship TargetStances = PlayerRelationship.Enemy | PlayerRelationship.Neutral; - public readonly PlayerRelationship ForceTargetStances = PlayerRelationship.Enemy | PlayerRelationship.Neutral | PlayerRelationship.Ally; + public readonly PlayerRelationship TargetRelationships = PlayerRelationship.Enemy | PlayerRelationship.Neutral; + public readonly PlayerRelationship ForceTargetRelationships = PlayerRelationship.Enemy | PlayerRelationship.Neutral | PlayerRelationship.Ally; [Desc("Cursor to display when hovering over a demolishable target.")] public readonly string Cursor = "c4"; @@ -118,10 +118,10 @@ namespace OpenRA.Mods.Common.Traits return false; var stance = target.Owner.RelationshipWith(self.Owner); - if (!info.TargetStances.HasStance(stance) && !modifiers.HasModifier(TargetModifiers.ForceAttack)) + if (!info.TargetRelationships.HasStance(stance) && !modifiers.HasModifier(TargetModifiers.ForceAttack)) return false; - if (!info.ForceTargetStances.HasStance(stance) && modifiers.HasModifier(TargetModifiers.ForceAttack)) + if (!info.ForceTargetRelationships.HasStance(stance) && modifiers.HasModifier(TargetModifiers.ForceAttack)) return false; return target.TraitsImplementing().Any(i => i.IsValidTarget(target, self)); @@ -130,10 +130,10 @@ namespace OpenRA.Mods.Common.Traits public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor) { var stance = target.Owner.RelationshipWith(self.Owner); - if (!info.TargetStances.HasStance(stance) && !modifiers.HasModifier(TargetModifiers.ForceAttack)) + if (!info.TargetRelationships.HasStance(stance) && !modifiers.HasModifier(TargetModifiers.ForceAttack)) return false; - if (!info.ForceTargetStances.HasStance(stance) && modifiers.HasModifier(TargetModifiers.ForceAttack)) + if (!info.ForceTargetRelationships.HasStance(stance) && modifiers.HasModifier(TargetModifiers.ForceAttack)) return false; return target.Info.TraitInfos().Any(i => i.IsValidTarget(target.Info, self)); diff --git a/OpenRA.Mods.Common/Traits/EngineerRepair.cs b/OpenRA.Mods.Common/Traits/EngineerRepair.cs index 0dcbfcedaf..80f78e1289 100644 --- a/OpenRA.Mods.Common/Traits/EngineerRepair.cs +++ b/OpenRA.Mods.Common/Traits/EngineerRepair.cs @@ -33,8 +33,8 @@ namespace OpenRA.Mods.Common.Traits "Possible values are Exit, Suicide, Dispose.")] public readonly EnterBehaviour EnterBehaviour = EnterBehaviour.Dispose; - [Desc("What diplomatic stances allow target to be repaired by this actor.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Ally; + [Desc("What player relationship the target's owner needs to be repaired by this actor.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Ally; [Desc("Sound to play when repairing is done.")] public readonly string RepairSound = null; @@ -117,7 +117,7 @@ namespace OpenRA.Mods.Common.Traits if (!engineerRepairable.Info.Types.IsEmpty && !engineerRepairable.Info.Types.Overlaps(info.Types)) return false; - if (!info.ValidStances.HasStance(target.Owner.RelationshipWith(self.Owner))) + if (!info.ValidRelationships.HasStance(target.Owner.RelationshipWith(self.Owner))) return false; if (target.GetDamageState() == DamageState.Undamaged) @@ -139,7 +139,7 @@ namespace OpenRA.Mods.Common.Traits if (!engineerRepairable.Types.IsEmpty && !engineerRepairable.Types.Overlaps(info.Types)) return false; - if (!info.ValidStances.HasStance(target.Owner.RelationshipWith(self.Owner))) + if (!info.ValidRelationships.HasStance(target.Owner.RelationshipWith(self.Owner))) return false; if (target.DamageState == DamageState.Undamaged) diff --git a/OpenRA.Mods.Common/Traits/GivesBounty.cs b/OpenRA.Mods.Common/Traits/GivesBounty.cs index df2fac8c6b..2ec98aab32 100644 --- a/OpenRA.Mods.Common/Traits/GivesBounty.cs +++ b/OpenRA.Mods.Common/Traits/GivesBounty.cs @@ -23,8 +23,8 @@ namespace OpenRA.Mods.Common.Traits [Desc("Percentage of the killed actor's Cost or CustomSellValue to be given.")] public readonly int Percentage = 10; - [Desc("Stance the attacking player needs to receive the bounty.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Neutral | PlayerRelationship.Enemy; + [Desc("Player relationships the attacking player needs to receive the bounty.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Neutral | PlayerRelationship.Enemy; [Desc("Whether to show a floating text announcing the won bounty.")] public readonly bool ShowBounty = true; @@ -64,7 +64,7 @@ namespace OpenRA.Mods.Common.Traits if (e.Attacker == null || e.Attacker.Disposed || IsTraitDisabled) return; - if (!Info.ValidStances.HasStance(e.Attacker.Owner.RelationshipWith(self.Owner))) + if (!Info.ValidRelationships.HasStance(e.Attacker.Owner.RelationshipWith(self.Owner))) return; if (!Info.DeathTypes.IsEmpty && !e.Damage.DamageTypes.Overlaps(Info.DeathTypes)) diff --git a/OpenRA.Mods.Common/Traits/GivesExperience.cs b/OpenRA.Mods.Common/Traits/GivesExperience.cs index 0deb4ee47d..c03fbacaf0 100644 --- a/OpenRA.Mods.Common/Traits/GivesExperience.cs +++ b/OpenRA.Mods.Common/Traits/GivesExperience.cs @@ -21,8 +21,8 @@ namespace OpenRA.Mods.Common.Traits [Desc("If -1, use the value of the unit cost.")] public readonly int Experience = -1; - [Desc("Stance the attacking player needs to receive the experience.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Neutral | PlayerRelationship.Enemy; + [Desc("Player relationships the attacking player needs to receive the experience.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Neutral | PlayerRelationship.Enemy; [Desc("Percentage of the `Experience` value that is being granted to the killing actor.")] public readonly int ActorExperienceModifier = 10000; @@ -59,7 +59,7 @@ namespace OpenRA.Mods.Common.Traits if (exp == 0 || e.Attacker == null || e.Attacker.Disposed) return; - if (!info.ValidStances.HasStance(e.Attacker.Owner.RelationshipWith(self.Owner))) + if (!info.ValidRelationships.HasStance(e.Attacker.Owner.RelationshipWith(self.Owner))) return; exp = Util.ApplyPercentageModifiers(exp, experienceModifiers); diff --git a/OpenRA.Mods.Common/Traits/JamsMissiles.cs b/OpenRA.Mods.Common/Traits/JamsMissiles.cs index 3c564093e6..01ed19f138 100644 --- a/OpenRA.Mods.Common/Traits/JamsMissiles.cs +++ b/OpenRA.Mods.Common/Traits/JamsMissiles.cs @@ -19,8 +19,8 @@ namespace OpenRA.Mods.Common.Traits [Desc("Range of the deflection.")] public readonly WDist Range = WDist.Zero; - [Desc("What diplomatic stances are affected.")] - public readonly PlayerRelationship DeflectionStances = PlayerRelationship.Ally | PlayerRelationship.Neutral | PlayerRelationship.Enemy; + [Desc("What player relationships are affected.")] + public readonly PlayerRelationship DeflectionRelationships = PlayerRelationship.Ally | PlayerRelationship.Neutral | PlayerRelationship.Enemy; [Desc("Chance of deflecting missiles.")] public readonly int Chance = 100; @@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.Traits public class JamsMissiles : ConditionalTrait { public WDist Range { get { return IsTraitDisabled ? WDist.Zero : Info.Range; } } - public PlayerRelationship DeflectionStances { get { return Info.DeflectionStances; } } + public PlayerRelationship DeflectionStances { get { return Info.DeflectionRelationships; } } public int Chance { get { return Info.Chance; } } public JamsMissiles(JamsMissilesInfo info) diff --git a/OpenRA.Mods.Common/Traits/Modifiers/FrozenUnderFog.cs b/OpenRA.Mods.Common/Traits/Modifiers/FrozenUnderFog.cs index 94b87ec6d3..c6651937f5 100644 --- a/OpenRA.Mods.Common/Traits/Modifiers/FrozenUnderFog.cs +++ b/OpenRA.Mods.Common/Traits/Modifiers/FrozenUnderFog.cs @@ -20,8 +20,8 @@ namespace OpenRA.Mods.Common.Traits [Desc("This actor will remain visible (but not updated visually) under fog, once discovered.")] public class FrozenUnderFogInfo : TraitInfo, Requires, IDefaultVisibilityInfo { - [Desc("Players with these stances can always see the actor.")] - public readonly PlayerRelationship AlwaysVisibleStances = PlayerRelationship.Ally; + [Desc("Players with these relationships can always see the actor.")] + public readonly PlayerRelationship AlwaysVisibleRelationships = PlayerRelationship.Ally; public override object Create(ActorInitializer init) { return new FrozenUnderFog(init, this); } } @@ -106,7 +106,7 @@ namespace OpenRA.Mods.Common.Traits return true; var stance = self.Owner.RelationshipWith(byPlayer); - return info.AlwaysVisibleStances.HasStance(stance) || IsVisibleInner(self, byPlayer); + return info.AlwaysVisibleRelationships.HasStance(stance) || IsVisibleInner(self, byPlayer); } void ITick.Tick(Actor self) diff --git a/OpenRA.Mods.Common/Traits/Modifiers/HiddenUnderShroud.cs b/OpenRA.Mods.Common/Traits/Modifiers/HiddenUnderShroud.cs index 49a5355976..60eac4cda8 100644 --- a/OpenRA.Mods.Common/Traits/Modifiers/HiddenUnderShroud.cs +++ b/OpenRA.Mods.Common/Traits/Modifiers/HiddenUnderShroud.cs @@ -19,8 +19,8 @@ namespace OpenRA.Mods.Common.Traits [Desc("The actor stays invisible under the shroud.")] public class HiddenUnderShroudInfo : TraitInfo, IDefaultVisibilityInfo { - [Desc("Players with these stances can always see the actor.")] - public readonly PlayerRelationship AlwaysVisibleStances = PlayerRelationship.Ally; + [Desc("Players with these relationships can always see the actor.")] + public readonly PlayerRelationship AlwaysVisibleRelationships = PlayerRelationship.Ally; [Desc("Possible values are CenterPosition (reveal when the center is visible) and ", "Footprint (reveal when any footprint cell is visible).")] @@ -56,7 +56,7 @@ namespace OpenRA.Mods.Common.Traits return true; var stance = self.Owner.RelationshipWith(byPlayer); - return Info.AlwaysVisibleStances.HasStance(stance) || IsVisibleInner(self, byPlayer); + return Info.AlwaysVisibleRelationships.HasStance(stance) || IsVisibleInner(self, byPlayer); } IEnumerable IRenderModifier.ModifyRender(Actor self, WorldRenderer wr, IEnumerable r) diff --git a/OpenRA.Mods.Common/Traits/Radar/AppearsOnRadar.cs b/OpenRA.Mods.Common/Traits/Radar/AppearsOnRadar.cs index 5d799c0341..eb3d2bb5f7 100644 --- a/OpenRA.Mods.Common/Traits/Radar/AppearsOnRadar.cs +++ b/OpenRA.Mods.Common/Traits/Radar/AppearsOnRadar.cs @@ -20,8 +20,8 @@ namespace OpenRA.Mods.Common.Traits.Radar { public readonly bool UseLocation = false; - [Desc("Player stances who can view this actor on radar.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Ally | PlayerRelationship.Neutral | PlayerRelationship.Enemy; + [Desc("Player relationships who can view this actor on radar.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Ally | PlayerRelationship.Neutral | PlayerRelationship.Enemy; public override object Create(ActorInitializer init) { return new AppearsOnRadar(this); } } @@ -42,7 +42,7 @@ namespace OpenRA.Mods.Common.Traits.Radar public void PopulateRadarSignatureCells(Actor self, List<(CPos Cell, Color Color)> destinationBuffer) { var viewer = self.World.RenderPlayer ?? self.World.LocalPlayer; - if (IsTraitDisabled || (viewer != null && !Info.ValidStances.HasStance(self.Owner.RelationshipWith(viewer)))) + if (IsTraitDisabled || (viewer != null && !Info.ValidRelationships.HasStance(self.Owner.RelationshipWith(viewer)))) return; var color = Game.Settings.Game.UsePlayerStanceColors ? self.Owner.PlayerStanceColor(self) : self.Owner.Color; diff --git a/OpenRA.Mods.Common/Traits/Render/CashTricklerBar.cs b/OpenRA.Mods.Common/Traits/Render/CashTricklerBar.cs index a51cf9498e..c30ffe1406 100644 --- a/OpenRA.Mods.Common/Traits/Render/CashTricklerBar.cs +++ b/OpenRA.Mods.Common/Traits/Render/CashTricklerBar.cs @@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Traits.Render class CashTricklerBarInfo : TraitInfo, Requires { [Desc("Defines to which players the bar is to be shown.")] - public readonly PlayerRelationship DisplayStances = PlayerRelationship.Ally; + public readonly PlayerRelationship DisplayRelationships = PlayerRelationship.Ally; public readonly Color Color = Color.Magenta; @@ -43,7 +43,7 @@ namespace OpenRA.Mods.Common.Traits.Render float ISelectionBar.GetValue() { var viewer = self.World.RenderPlayer ?? self.World.LocalPlayer; - if (viewer != null && !info.DisplayStances.HasStance(self.Owner.RelationshipWith(viewer))) + if (viewer != null && !info.DisplayRelationships.HasStance(self.Owner.RelationshipWith(viewer))) return 0; var complete = cashTricklers.Min(ct => (float)ct.Ticks / ct.Info.Interval); diff --git a/OpenRA.Mods.Common/Traits/Render/SupportPowerChargeBar.cs b/OpenRA.Mods.Common/Traits/Render/SupportPowerChargeBar.cs index d1c27faef8..791a03b36b 100644 --- a/OpenRA.Mods.Common/Traits/Render/SupportPowerChargeBar.cs +++ b/OpenRA.Mods.Common/Traits/Render/SupportPowerChargeBar.cs @@ -19,7 +19,7 @@ namespace OpenRA.Mods.Common.Traits.Render class SupportPowerChargeBarInfo : ConditionalTraitInfo { [Desc("Defines to which players the bar is to be shown.")] - public readonly PlayerRelationship DisplayStances = PlayerRelationship.Ally; + public readonly PlayerRelationship DisplayRelationships = PlayerRelationship.Ally; public readonly Color Color = Color.Magenta; @@ -48,7 +48,7 @@ namespace OpenRA.Mods.Common.Traits.Render return 0; var viewer = self.World.RenderPlayer ?? self.World.LocalPlayer; - if (viewer != null && !Info.DisplayStances.HasStance(self.Owner.RelationshipWith(viewer))) + if (viewer != null && !Info.DisplayRelationships.HasStance(self.Owner.RelationshipWith(viewer))) return 0; return 1 - (float)power.RemainingTicks / power.TotalTicks; diff --git a/OpenRA.Mods.Common/Traits/Render/WithDecorationBase.cs b/OpenRA.Mods.Common/Traits/Render/WithDecorationBase.cs index a342868dea..90762e2faf 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithDecorationBase.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithDecorationBase.cs @@ -24,8 +24,8 @@ namespace OpenRA.Mods.Common.Traits.Render [Desc("Position in the actor's selection box to draw the decoration.")] public readonly string Position = "TopLeft"; - [Desc("Player stances who can view the decoration.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Ally; + [Desc("Player relationships who can view the decoration.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Ally; [Desc("Should this be visible only when selected?")] public readonly bool RequiresSelection = false; @@ -82,7 +82,7 @@ namespace OpenRA.Mods.Common.Traits.Render if (self.World.RenderPlayer != null) { var stance = self.Owner.RelationshipWith(self.World.RenderPlayer); - if (!Info.ValidStances.HasStance(stance)) + if (!Info.ValidRelationships.HasStance(stance)) return false; } diff --git a/OpenRA.Mods.Common/Traits/Render/WithRangeCircle.cs b/OpenRA.Mods.Common/Traits/Render/WithRangeCircle.cs index b480fa590c..6b15459c6f 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithRangeCircle.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithRangeCircle.cs @@ -40,9 +40,9 @@ namespace OpenRA.Mods.Common.Traits.Render [Desc("If set, the color of the owning player will be used instead of `Color`.")] public readonly bool UsePlayerColor = false; - [Desc("Stances of players which will be able to see the circle.", + [Desc("Player relationships which will be able to see the circle.", "Valid values are combinations of `None`, `Ally`, `Enemy` and `Neutral`.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Ally; + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Ally; [Desc("When to show the range circle. Valid values are `Always`, and `WhenSelected`")] public readonly RangeCircleVisibility Visible = RangeCircleVisibility.WhenSelected; @@ -91,7 +91,7 @@ namespace OpenRA.Mods.Common.Traits.Render return false; var p = self.World.RenderPlayer; - return p == null || Info.ValidStances.HasStance(self.Owner.RelationshipWith(p)) || (p.Spectating && !p.NonCombatant); + return p == null || Info.ValidRelationships.HasStance(self.Owner.RelationshipWith(p)) || (p.Spectating && !p.NonCombatant); } } diff --git a/OpenRA.Mods.Common/Traits/RevealOnDeath.cs b/OpenRA.Mods.Common/Traits/RevealOnDeath.cs index aa1ccb920b..f50a5e4b43 100644 --- a/OpenRA.Mods.Common/Traits/RevealOnDeath.cs +++ b/OpenRA.Mods.Common/Traits/RevealOnDeath.cs @@ -18,8 +18,8 @@ namespace OpenRA.Mods.Common.Traits [Desc("Reveal this actor's last position when killed.")] public class RevealOnDeathInfo : ConditionalTraitInfo { - [Desc("Stances relative to the actors' owner that shroud will be revealed for.")] - public readonly PlayerRelationship RevealForStances = PlayerRelationship.Ally; + [Desc("Relationships relative to the actors' owner that shroud will be revealed for.")] + public readonly PlayerRelationship RevealForRelationships = PlayerRelationship.Ally; [Desc("Duration of the reveal.")] public readonly int Duration = 25; @@ -66,7 +66,7 @@ namespace OpenRA.Mods.Common.Traits w.Add(new RevealShroudEffect(self.CenterPosition, info.Radius, info.RevealGeneratedShroud ? Shroud.SourceType.Visibility : Shroud.SourceType.PassiveVisibility, - owner, info.RevealForStances, duration: info.Duration)); + owner, info.RevealForRelationships, duration: info.Duration)); }); } } diff --git a/OpenRA.Mods.Common/Traits/RevealOnFire.cs b/OpenRA.Mods.Common/Traits/RevealOnFire.cs index 1c57a9d761..efb9978ce9 100644 --- a/OpenRA.Mods.Common/Traits/RevealOnFire.cs +++ b/OpenRA.Mods.Common/Traits/RevealOnFire.cs @@ -21,8 +21,8 @@ namespace OpenRA.Mods.Common.Traits [Desc("The armament types which trigger revealing.")] public readonly string[] ArmamentNames = { "primary", "secondary" }; - [Desc("Stances relative to the target player this actor will be revealed to during firing.")] - public readonly PlayerRelationship RevealForStancesRelativeToTarget = PlayerRelationship.Ally; + [Desc("Player relationships relative to the target player this actor will be revealed to during firing.")] + public readonly PlayerRelationship RevealForRelationships = PlayerRelationship.Ally; [Desc("Duration of the reveal.")] public readonly int Duration = 25; @@ -60,7 +60,7 @@ namespace OpenRA.Mods.Common.Traits { self.World.AddFrameEndTask(w => w.Add(new RevealShroudEffect(self.CenterPosition, info.Radius, info.RevealGeneratedShroud ? Shroud.SourceType.Visibility : Shroud.SourceType.PassiveVisibility, - targetPlayer, info.RevealForStancesRelativeToTarget, duration: info.Duration))); + targetPlayer, info.RevealForRelationships, duration: info.Duration))); } } diff --git a/OpenRA.Mods.Common/Traits/RevealsMap.cs b/OpenRA.Mods.Common/Traits/RevealsMap.cs index 40ec09684f..9d974f2c70 100644 --- a/OpenRA.Mods.Common/Traits/RevealsMap.cs +++ b/OpenRA.Mods.Common/Traits/RevealsMap.cs @@ -16,8 +16,8 @@ namespace OpenRA.Mods.Common.Traits [Desc("Reveals shroud and fog across the whole map while active.")] public class RevealsMapInfo : ConditionalTraitInfo { - [Desc("Stance the watching player needs to see the shroud removed.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Ally; + [Desc("Relationships the watching player needs to see the shroud removed.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Ally; [Desc("Can this actor reveal shroud generated by the `GeneratesShroud` trait?")] public readonly bool RevealGeneratedShroud = true; @@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.Traits protected void AddCellsToPlayerShroud(Actor self, Player p, PPos[] uv) { - if (!Info.ValidStances.HasStance(self.Owner.RelationshipWith(p))) + if (!Info.ValidRelationships.HasStance(self.Owner.RelationshipWith(p))) return; p.Shroud.AddSource(this, type, uv); diff --git a/OpenRA.Mods.Common/Traits/RevealsShroud.cs b/OpenRA.Mods.Common/Traits/RevealsShroud.cs index 9d3355cf86..14646464a6 100644 --- a/OpenRA.Mods.Common/Traits/RevealsShroud.cs +++ b/OpenRA.Mods.Common/Traits/RevealsShroud.cs @@ -17,8 +17,8 @@ namespace OpenRA.Mods.Common.Traits { public class RevealsShroudInfo : AffectsShroudInfo { - [Desc("Stance the watching player needs to see the shroud removed.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Ally; + [Desc("Relationships the watching player needs to see the shroud removed.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Ally; [Desc("Can this actor reveal shroud generated by the GeneratesShroud trait?")] public readonly bool RevealGeneratedShroud = true; @@ -49,7 +49,7 @@ namespace OpenRA.Mods.Common.Traits protected override void AddCellsToPlayerShroud(Actor self, Player p, PPos[] uv) { - if (!info.ValidStances.HasStance(self.Owner.RelationshipWith(p))) + if (!info.ValidRelationships.HasStance(self.Owner.RelationshipWith(p))) return; p.Shroud.AddSource(this, type, uv); diff --git a/OpenRA.Mods.Common/Traits/Sound/VoiceAnnouncement.cs b/OpenRA.Mods.Common/Traits/Sound/VoiceAnnouncement.cs index 6e681b1591..6c2fd32bf0 100644 --- a/OpenRA.Mods.Common/Traits/Sound/VoiceAnnouncement.cs +++ b/OpenRA.Mods.Common/Traits/Sound/VoiceAnnouncement.cs @@ -21,8 +21,8 @@ namespace OpenRA.Mods.Common.Traits.Sound [Desc("Voice to play.")] public readonly string Voice = null; - [Desc("Player stances who can hear this voice.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Ally | PlayerRelationship.Neutral | PlayerRelationship.Enemy; + [Desc("Player relationships who can hear this voice.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Ally | PlayerRelationship.Neutral | PlayerRelationship.Enemy; [Desc("Play the voice to the owning player even if Stance.Ally is not included in ValidStances.")] public readonly bool PlayToOwner = true; @@ -53,7 +53,7 @@ namespace OpenRA.Mods.Common.Traits.Sound if (player == null) return; - if (Info.ValidStances.HasStance(self.Owner.RelationshipWith(player))) + if (Info.ValidRelationships.HasStance(self.Owner.RelationshipWith(player))) self.PlayVoice(Info.Voice); else if (Info.PlayToOwner && self.Owner == player) self.PlayVoice(Info.Voice); diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/GrantExternalConditionPower.cs b/OpenRA.Mods.Common/Traits/SupportPowers/GrantExternalConditionPower.cs index 3a09464582..460dd79c6f 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/GrantExternalConditionPower.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/GrantExternalConditionPower.cs @@ -39,8 +39,8 @@ namespace OpenRA.Mods.Common.Traits [Desc("Sound to instantly play at the targeted area.")] public readonly string OnFireSound = null; - [Desc("Player stances which condition can be applied to.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Ally; + [Desc("Player relationships which condition can be applied to.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Ally; [SequenceReference] [Desc("Sequence to play for granting actor when activated.", @@ -96,7 +96,7 @@ namespace OpenRA.Mods.Common.Traits return units.Distinct().Where(a => { - if (!info.ValidStances.HasStance(Self.Owner.RelationshipWith(a.Owner))) + if (!info.ValidRelationships.HasStance(Self.Owner.RelationshipWith(a.Owner))) return false; return a.TraitsImplementing() diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/NukePower.cs b/OpenRA.Mods.Common/Traits/SupportPowers/NukePower.cs index 9f5f03610d..d1f7b027aa 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/NukePower.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/NukePower.cs @@ -94,8 +94,8 @@ namespace OpenRA.Mods.Common.Traits [Desc("Can the camera reveal shroud generated by the GeneratesShroud trait?")] public readonly bool RevealGeneratedShroud = true; - [Desc("Reveal cells to players with these stances only.")] - public readonly PlayerRelationship CameraStances = PlayerRelationship.Ally; + [Desc("Reveal cells to players with these relationships only.")] + public readonly PlayerRelationship CameraRelationships = PlayerRelationship.Ally; [Desc("Amount of time before detonation to spawn the camera.")] public readonly int CameraSpawnAdvance = 25; @@ -180,7 +180,7 @@ namespace OpenRA.Mods.Common.Traits var type = info.RevealGeneratedShroud ? Shroud.SourceType.Visibility : Shroud.SourceType.PassiveVisibility; - self.World.AddFrameEndTask(w => w.Add(new RevealShroudEffect(targetPosition, info.CameraRange, type, self.Owner, info.CameraStances, + self.World.AddFrameEndTask(w => w.Add(new RevealShroudEffect(targetPosition, info.CameraRange, type, self.Owner, info.CameraRelationships, info.FlightDelay - info.CameraSpawnAdvance, info.CameraSpawnAdvance + info.CameraRemoveDelay))); } diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/SupportPower.cs b/OpenRA.Mods.Common/Traits/SupportPowers/SupportPower.cs index 001c7a567a..ef4fab6542 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/SupportPower.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/SupportPower.cs @@ -77,7 +77,7 @@ namespace OpenRA.Mods.Common.Traits public readonly string IncomingSpeechNotification = null; [Desc("Defines to which players the timer is shown.")] - public readonly PlayerRelationship DisplayTimerStances = PlayerRelationship.None; + public readonly PlayerRelationship DisplayTimerRelationships = PlayerRelationship.None; [Desc("Beacons are only supported on the Airstrike, Paratroopers, and Nuke powers")] public readonly bool DisplayBeacon = false; diff --git a/OpenRA.Mods.Common/Traits/TooltipDescription.cs b/OpenRA.Mods.Common/Traits/TooltipDescription.cs index e2690c44da..670c8e6f93 100644 --- a/OpenRA.Mods.Common/Traits/TooltipDescription.cs +++ b/OpenRA.Mods.Common/Traits/TooltipDescription.cs @@ -20,8 +20,8 @@ namespace OpenRA.Mods.Common.Traits [Translate] public readonly string Description = ""; - [Desc("Player stances who can view the description.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Ally | PlayerRelationship.Neutral | PlayerRelationship.Enemy; + [Desc("Player relationships who can view the description.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Ally | PlayerRelationship.Neutral | PlayerRelationship.Enemy; public override object Create(ActorInitializer init) { return new TooltipDescription(init.Self, this); } } @@ -53,7 +53,7 @@ namespace OpenRA.Mods.Common.Traits if (Owner == null || forPlayer == null) return false; - return Info.ValidStances.HasStance(Owner.RelationshipWith(forPlayer)); + return Info.ValidRelationships.HasStance(Owner.RelationshipWith(forPlayer)); } public string TooltipText diff --git a/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs b/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs index be36eb1d70..b32d53c4e4 100644 --- a/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs +++ b/OpenRA.Mods.Common/Warheads/CreateEffectWarhead.cs @@ -80,7 +80,7 @@ namespace OpenRA.Mods.Common.Warheads public override bool IsValidAgainst(Actor victim, Actor firedBy) { var stance = firedBy.Owner.RelationshipWith(victim.Owner); - if (!ValidStances.HasStance(stance)) + if (!ValidRelationships.HasStance(stance)) return false; // A target type is valid if it is in the valid targets list, and not in the invalid targets list. diff --git a/OpenRA.Mods.Common/Warheads/Warhead.cs b/OpenRA.Mods.Common/Warheads/Warhead.cs index 78b54d1ebc..3e82722cc1 100644 --- a/OpenRA.Mods.Common/Warheads/Warhead.cs +++ b/OpenRA.Mods.Common/Warheads/Warhead.cs @@ -31,8 +31,8 @@ namespace OpenRA.Mods.Common.Warheads [Desc("What types of targets are unaffected.", "Overrules ValidTargets.")] public readonly BitSet InvalidTargets; - [Desc("What diplomatic stances are affected.")] - public readonly PlayerRelationship ValidStances = PlayerRelationship.Ally | PlayerRelationship.Neutral | PlayerRelationship.Enemy; + [Desc("What player relationships are affected.")] + public readonly PlayerRelationship ValidRelationships = PlayerRelationship.Ally | PlayerRelationship.Neutral | PlayerRelationship.Enemy; [Desc("Can this warhead affect the actor that fired it.")] public readonly bool AffectsParent = false; @@ -63,7 +63,7 @@ namespace OpenRA.Mods.Common.Warheads return false; var stance = firedBy.Owner.RelationshipWith(victim.Owner); - if (!ValidStances.HasStance(stance)) + if (!ValidRelationships.HasStance(stance)) return false; // A target type is valid if it is in the valid targets list, and not in the invalid targets list. @@ -81,7 +81,7 @@ namespace OpenRA.Mods.Common.Warheads // AffectsParent checks do not make sense for FrozenActors, so skip to stance checks var stance = firedBy.Owner.RelationshipWith(victim.Owner); - if (!ValidStances.HasStance(stance)) + if (!ValidRelationships.HasStance(stance)) return false; // A target type is valid if it is in the valid targets list, and not in the invalid targets list. diff --git a/OpenRA.Mods.Common/Widgets/SupportPowerTimerWidget.cs b/OpenRA.Mods.Common/Widgets/SupportPowerTimerWidget.cs index 9a0ca911ed..7b5ccd517c 100644 --- a/OpenRA.Mods.Common/Widgets/SupportPowerTimerWidget.cs +++ b/OpenRA.Mods.Common/Widgets/SupportPowerTimerWidget.cs @@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Widgets powers = world.ActorsWithTrait() .Where(p => !p.Actor.IsDead && !p.Actor.Owner.NonCombatant) .SelectMany(s => s.Trait.Powers.Values) - .Where(p => p.Instances.Any() && p.Info.DisplayTimerStances != PlayerRelationship.None && !p.Disabled); + .Where(p => p.Instances.Any() && p.Info.DisplayTimerRelationships != PlayerRelationship.None && !p.Disabled); // Timers in replays should be synced to the effective game time, not the playback time. timestep = world.Timestep; @@ -53,7 +53,7 @@ namespace OpenRA.Mods.Common.Widgets { var owner = p.Instances[0].Self.Owner; var viewer = owner.World.RenderPlayer ?? owner.World.LocalPlayer; - return viewer == null || p.Info.DisplayTimerStances.HasStance(owner.RelationshipWith(viewer)); + return viewer == null || p.Info.DisplayTimerRelationships.HasStance(owner.RelationshipWith(viewer)); }); texts = displayedPowers.Select(p =>