diff --git a/OpenRA.Game/GameInformation.cs b/OpenRA.Game/GameInformation.cs index 5a730626bc..fd30f187ff 100644 --- a/OpenRA.Game/GameInformation.cs +++ b/OpenRA.Game/GameInformation.cs @@ -147,10 +147,10 @@ namespace OpenRA public bool IsHuman; public bool IsBot; - // The faction name (aka Country) + // The faction's display name. public string FactionName; - // The faction id (aka Country, aka Race) + // The faction ID, a.k.a. the faction's internal name. public string FactionId; public HSLColor Color; diff --git a/OpenRA.Game/Map/MapPlayers.cs b/OpenRA.Game/Map/MapPlayers.cs index d9a41012dc..97a2741f11 100644 --- a/OpenRA.Game/Map/MapPlayers.cs +++ b/OpenRA.Game/Map/MapPlayers.cs @@ -28,7 +28,7 @@ namespace OpenRA public MapPlayers(Ruleset rules, int playerCount) { - var firstRace = rules.Actors["world"].Traits + var firstFaction = rules.Actors["world"].Traits .WithInterface().First(f => f.Selectable).InternalName; Players = new Dictionary @@ -37,7 +37,7 @@ namespace OpenRA "Neutral", new PlayerReference { Name = "Neutral", - Faction = firstRace, + Faction = firstFaction, OwnsWorld = true, NonCombatant = true } @@ -46,7 +46,7 @@ namespace OpenRA "Creeps", new PlayerReference { Name = "Creeps", - Faction = firstRace, + Faction = firstFaction, NonCombatant = true, Enemies = Exts.MakeArray(playerCount, i => "Multi{0}".F(i)) } diff --git a/OpenRA.Game/Traits/BodyOrientation.cs b/OpenRA.Game/Traits/BodyOrientation.cs index c043d164b6..54afb6dbd8 100644 --- a/OpenRA.Game/Traits/BodyOrientation.cs +++ b/OpenRA.Game/Traits/BodyOrientation.cs @@ -61,7 +61,7 @@ namespace OpenRA.Traits { this.info = info; var self = init.Self; - var race = init.Contains() ? init.Get() : self.Owner.Faction.InternalName; + var faction = init.Contains() ? init.Get() : self.Owner.Faction.InternalName; quantizedFacings = Exts.Lazy(() => { @@ -73,7 +73,7 @@ namespace OpenRA.Traits if (qboi == null) throw new InvalidOperationException("Actor type '" + self.Info.Name + "' does not define a quantized body orientation."); - return qboi.QuantizedBodyFacings(self.Info, self.World.Map.SequenceProvider, race); + return qboi.QuantizedBodyFacings(self.Info, self.World.Map.SequenceProvider, faction); }); } diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index 0fb00d6296..b5352257e8 100644 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -322,7 +322,7 @@ namespace OpenRA.Traits WRot QuantizeOrientation(WRot orientation, int facings); } - public interface IQuantizeBodyOrientationInfo { int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string race); } + public interface IQuantizeBodyOrientationInfo { int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction); } public interface ITargetableInfo { diff --git a/OpenRA.Mods.Cnc/Traits/Buildings/ProductionAirdrop.cs b/OpenRA.Mods.Cnc/Traits/Buildings/ProductionAirdrop.cs index 67e121e59d..49d25c9ce6 100644 --- a/OpenRA.Mods.Cnc/Traits/Buildings/ProductionAirdrop.cs +++ b/OpenRA.Mods.Cnc/Traits/Buildings/ProductionAirdrop.cs @@ -32,7 +32,7 @@ namespace OpenRA.Mods.Cnc.Traits public ProductionAirdrop(ActorInitializer init, ProductionAirdropInfo info) : base(init, info) { } - public override bool Produce(Actor self, ActorInfo producee, string raceVariant) + public override bool Produce(Actor self, ActorInfo producee, string factionVariant) { var owner = self.Owner; @@ -73,7 +73,7 @@ namespace OpenRA.Mods.Cnc.Traits foreach (var cargo in self.TraitsImplementing()) cargo.Delivered(self); - self.World.AddFrameEndTask(ww => DoProduction(self, producee, exit, raceVariant)); + self.World.AddFrameEndTask(ww => DoProduction(self, producee, exit, factionVariant)); Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", info.ReadyAudio, self.Owner.Faction.InternalName); })); diff --git a/OpenRA.Mods.Cnc/Traits/Render/WithGunboatBody.cs b/OpenRA.Mods.Cnc/Traits/Render/WithGunboatBody.cs index 258a8f1d99..a03e44246e 100644 --- a/OpenRA.Mods.Cnc/Traits/Render/WithGunboatBody.cs +++ b/OpenRA.Mods.Cnc/Traits/Render/WithGunboatBody.cs @@ -28,7 +28,7 @@ namespace OpenRA.Mods.Cnc.Traits public override object Create(ActorInitializer init) { return new WithGunboatBody(init, this); } - public override int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string race) + public override int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction) { return 2; } diff --git a/OpenRA.Mods.Common/Lint/CheckPlayers.cs b/OpenRA.Mods.Common/Lint/CheckPlayers.cs index 615facb123..ba118cad44 100644 --- a/OpenRA.Mods.Common/Lint/CheckPlayers.cs +++ b/OpenRA.Mods.Common/Lint/CheckPlayers.cs @@ -41,10 +41,10 @@ namespace OpenRA.Mods.Common.Lint var worldActor = map.Rules.Actors["world"]; - var races = worldActor.Traits.WithInterface().Select(f => f.InternalName).ToHashSet(); + var factions = worldActor.Traits.WithInterface().Select(f => f.InternalName).ToHashSet(); foreach (var player in players.Values) - if (!string.IsNullOrWhiteSpace(player.Faction) && !races.Contains(player.Faction)) - emitError("Invalid race {0} chosen for player {1}.".F(player.Faction, player.Name)); + if (!string.IsNullOrWhiteSpace(player.Faction) && !factions.Contains(player.Faction)) + emitError("Invalid faction {0} chosen for player {1}.".F(player.Faction, player.Name)); if (worldActor.Traits.Contains()) { diff --git a/OpenRA.Mods.Common/Lint/CheckSequences.cs b/OpenRA.Mods.Common/Lint/CheckSequences.cs index a8c640765a..d2b5464f10 100644 --- a/OpenRA.Mods.Common/Lint/CheckSequences.cs +++ b/OpenRA.Mods.Common/Lint/CheckSequences.cs @@ -36,21 +36,21 @@ namespace OpenRA.Mods.Common.Lint Game.ModData.Manifest.Sequences.Select(MiniYaml.FromFile).Aggregate(MiniYaml.MergeLiberal)); var rules = map == null ? Game.ModData.DefaultRules : map.Rules; - var races = rules.Actors["world"].Traits.WithInterface().Select(f => f.InternalName).ToArray(); + var factions = rules.Actors["world"].Traits.WithInterface().Select(f => f.InternalName).ToArray(); var sequenceProviders = map == null ? rules.Sequences.Values : new[] { rules.Sequences[map.Tileset] }; foreach (var actorInfo in rules.Actors) { foreach (var renderInfo in actorInfo.Value.Traits.WithInterface()) { - foreach (var race in races) + foreach (var faction in factions) { foreach (var sequenceProvider in sequenceProviders) { - var image = renderInfo.GetImage(actorInfo.Value, sequenceProvider, race); + var image = renderInfo.GetImage(actorInfo.Value, sequenceProvider, faction); if (sequenceDefinitions.All(s => s.Key != image.ToLowerInvariant()) && !actorInfo.Value.Name.Contains("^")) - emitWarning("Sprite image {0} from actor {1} using race {2} has no sequence definition." - .F(image, actorInfo.Value.Name, race)); + emitWarning("Sprite image {0} from actor {1} using faction {2} has no sequence definition." + .F(image, actorInfo.Value.Name, faction)); } } } @@ -72,7 +72,7 @@ namespace OpenRA.Mods.Common.Lint if (renderInfo == null) continue; - foreach (var race in races) + foreach (var faction in factions) { var sequenceReference = field.GetCustomAttributes(true).FirstOrDefault(); if (sequenceReference != null && !string.IsNullOrEmpty(sequenceReference.ImageReference)) @@ -85,7 +85,7 @@ namespace OpenRA.Mods.Common.Lint if (!string.IsNullOrEmpty(imageOverride) && sequenceDefinitions.All(s => s.Key != imageOverride.ToLowerInvariant())) emitWarning("Custom sprite image {0} from actor {1} has no sequence definition.".F(imageOverride, actorInfo.Value.Name)); else - CheckDefintions(imageOverride, sequenceReference, actorInfo, sequence, race, field, traitInfo); + CheckDefintions(imageOverride, sequenceReference, actorInfo, sequence, faction, field, traitInfo); } } } @@ -93,8 +93,8 @@ namespace OpenRA.Mods.Common.Lint { foreach (var sequenceProvider in sequenceProviders) { - var image = renderInfo.GetImage(actorInfo.Value, sequenceProvider, race); - CheckDefintions(image, sequenceReference, actorInfo, sequence, race, field, traitInfo); + var image = renderInfo.GetImage(actorInfo.Value, sequenceProvider, faction); + CheckDefintions(image, sequenceReference, actorInfo, sequence, faction, field, traitInfo); } } } @@ -148,7 +148,7 @@ namespace OpenRA.Mods.Common.Lint } void CheckDefintions(string image, SequenceReferenceAttribute sequenceReference, - KeyValuePair actorInfo, string sequence, string race, FieldInfo field, ITraitInfo traitInfo) + KeyValuePair actorInfo, string sequence, string faction, FieldInfo field, ITraitInfo traitInfo) { var definitions = sequenceDefinitions.FirstOrDefault(n => n.Key == image.ToLowerInvariant()); if (definitions != null) @@ -157,12 +157,12 @@ namespace OpenRA.Mods.Common.Lint { if (!definitions.Value.Nodes.Any(n => n.Key.StartsWith(sequence))) emitWarning("Sprite image {0} from actor {1} of faction {2} does not define sequence prefix {3} from field {4} of {5}" - .F(image, actorInfo.Value.Name, race, sequence, field.Name, traitInfo)); + .F(image, actorInfo.Value.Name, faction, sequence, field.Name, traitInfo)); } else if (definitions.Value.Nodes.All(n => n.Key != sequence)) { emitWarning("Sprite image {0} from actor {1} of faction {2} does not define sequence {3} from field {4} of {5}" - .F(image, actorInfo.Value.Name, race, sequence, field.Name, traitInfo)); + .F(image, actorInfo.Value.Name, faction, sequence, field.Name, traitInfo)); } } } diff --git a/OpenRA.Mods.Common/Scripting/Properties/ProductionProperties.cs b/OpenRA.Mods.Common/Scripting/Properties/ProductionProperties.cs index 06d4f607f0..335e71b9f0 100644 --- a/OpenRA.Mods.Common/Scripting/Properties/ProductionProperties.cs +++ b/OpenRA.Mods.Common/Scripting/Properties/ProductionProperties.cs @@ -33,13 +33,13 @@ namespace OpenRA.Mods.Common.Scripting [ScriptActorPropertyActivity] [Desc("Build a unit, ignoring the production queue. The activity will wait if the exit is blocked.")] - public void Produce(string actorType, string raceVariant = null) + public void Produce(string actorType, string factionVariant = null) { ActorInfo actorInfo; if (!Self.World.Map.Rules.Actors.TryGetValue(actorType, out actorInfo)) throw new LuaException("Unknown actor type '{0}'".F(actorType)); - Self.QueueActivity(new WaitFor(() => p.Produce(Self, actorInfo, raceVariant))); + Self.QueueActivity(new WaitFor(() => p.Produce(Self, actorInfo, factionVariant))); } } diff --git a/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs b/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs index 79f90d448e..c8b72cba6e 100644 --- a/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs +++ b/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs @@ -748,7 +748,7 @@ namespace OpenRA.Mods.Common.Server if (targetClient.Index != client.Index && !client.IsAdmin) return true; - // Map has disabled race changes + // Map has disabled faction changes if (server.LobbyInfo.Slots[targetClient.Slot].LockFaction) return true; diff --git a/OpenRA.Mods.Common/Traits/CaptureNotification.cs b/OpenRA.Mods.Common/Traits/CaptureNotification.cs index 6fb779925e..f82dd4de95 100644 --- a/OpenRA.Mods.Common/Traits/CaptureNotification.cs +++ b/OpenRA.Mods.Common/Traits/CaptureNotification.cs @@ -33,8 +33,8 @@ namespace OpenRA.Mods.Common.Traits if (captor.World.LocalPlayer != captor.Owner) return; - var race = info.NewOwnerVoice ? newOwner.Faction.InternalName : oldOwner.Faction.InternalName; - Sound.PlayNotification(self.World.Map.Rules, captor.World.LocalPlayer, "Speech", info.Notification, race); + var faction = info.NewOwnerVoice ? newOwner.Faction.InternalName : oldOwner.Faction.InternalName; + Sound.PlayNotification(self.World.Map.Rules, captor.World.LocalPlayer, "Speech", info.Notification, faction); } } } diff --git a/OpenRA.Mods.Common/Traits/Crates/SupportPowerCrateAction.cs b/OpenRA.Mods.Common/Traits/Crates/SupportPowerCrateAction.cs index 3e1047be34..7677efef70 100644 --- a/OpenRA.Mods.Common/Traits/Crates/SupportPowerCrateAction.cs +++ b/OpenRA.Mods.Common/Traits/Crates/SupportPowerCrateAction.cs @@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.Traits this.info = info; } - // The free unit crate requires same race and the actor needs to be mobile. + // The free unit crate requires same faction and the actor needs to be mobile. // We want neither of these properties for crate power proxies. public override void Activate(Actor collector) { diff --git a/OpenRA.Mods.Common/Traits/Render/RenderSimple.cs b/OpenRA.Mods.Common/Traits/Render/RenderSimple.cs index e53470d01a..311b4cf1e3 100644 --- a/OpenRA.Mods.Common/Traits/Render/RenderSimple.cs +++ b/OpenRA.Mods.Common/Traits/Render/RenderSimple.cs @@ -34,9 +34,9 @@ namespace OpenRA.Mods.Common.Traits yield return new SpriteActorPreview(anim, WVec.Zero, 0, p, rs.Scale); } - public virtual int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string race) + public virtual int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction) { - return sequenceProvider.GetSequence(GetImage(ai, sequenceProvider, race), Sequence).Facings; + return sequenceProvider.GetSequence(GetImage(ai, sequenceProvider, faction), Sequence).Facings; } } diff --git a/OpenRA.Mods.Common/Traits/Render/RenderSprites.cs b/OpenRA.Mods.Common/Traits/Render/RenderSprites.cs index 02b95f0d37..551e638fcd 100644 --- a/OpenRA.Mods.Common/Traits/Render/RenderSprites.cs +++ b/OpenRA.Mods.Common/Traits/Render/RenderSprites.cs @@ -57,9 +57,9 @@ namespace OpenRA.Mods.Common.Traits public IEnumerable RenderPreview(ActorPreviewInitializer init) { var sequenceProvider = init.World.Map.SequenceProvider; - var race = init.Get(); + var faction = init.Get(); var ownerName = init.Get().PlayerName; - var image = GetImage(init.Actor, sequenceProvider, race); + var image = GetImage(init.Actor, sequenceProvider, faction); var palette = init.WorldRenderer.Palette(Palette ?? PlayerPalette + ownerName); var facings = 0; @@ -71,7 +71,7 @@ namespace OpenRA.Mods.Common.Traits if (facings == -1) { var qbo = init.Actor.Traits.GetOrDefault(); - facings = qbo != null ? qbo.QuantizedBodyFacings(init.Actor, sequenceProvider, race) : 1; + facings = qbo != null ? qbo.QuantizedBodyFacings(init.Actor, sequenceProvider, faction) : 1; } } @@ -80,13 +80,13 @@ namespace OpenRA.Mods.Common.Traits yield return preview; } - public string GetImage(ActorInfo actor, SequenceProvider sequenceProvider, string race) + public string GetImage(ActorInfo actor, SequenceProvider sequenceProvider, string faction) { - if (FactionImages != null && !string.IsNullOrEmpty(race)) + if (FactionImages != null && !string.IsNullOrEmpty(faction)) { - string raceImage = null; - if (FactionImages.TryGetValue(race, out raceImage) && sequenceProvider.HasSequence(raceImage)) - return raceImage; + string factionImage = null; + if (FactionImages.TryGetValue(faction, out factionImage) && sequenceProvider.HasSequence(factionImage)) + return factionImage; } return (Image ?? actor.Name).ToLowerInvariant(); diff --git a/OpenRA.Mods.Common/Traits/Render/RenderVoxels.cs b/OpenRA.Mods.Common/Traits/Render/RenderVoxels.cs index 815c390e72..6cc787af15 100644 --- a/OpenRA.Mods.Common/Traits/Render/RenderVoxels.cs +++ b/OpenRA.Mods.Common/Traits/Render/RenderVoxels.cs @@ -48,12 +48,12 @@ namespace OpenRA.Mods.Common.Traits public virtual IEnumerable RenderPreview(ActorPreviewInitializer init) { var body = init.Actor.Traits.Get(); - var race = init.Get(); + var faction = init.Get(); var ownerName = init.Get().PlayerName; var sequenceProvider = init.World.Map.SequenceProvider; var image = Image ?? init.Actor.Name; var facings = body.QuantizedFacings == -1 ? - init.Actor.Traits.Get().QuantizedBodyFacings(init.Actor, sequenceProvider, race) : + init.Actor.Traits.Get().QuantizedBodyFacings(init.Actor, sequenceProvider, faction) : body.QuantizedFacings; var palette = init.WorldRenderer.Palette(Palette ?? PlayerPalette + ownerName); diff --git a/OpenRA.Mods.Common/Traits/Render/WithCrateBody.cs b/OpenRA.Mods.Common/Traits/Render/WithCrateBody.cs index a44c17e0aa..523f20e399 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithCrateBody.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithCrateBody.cs @@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Traits yield return new SpriteActorPreview(anim, WVec.Zero, 0, p, rs.Scale); } - public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string race) { return 1; } + public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction) { return 1; } } class WithCrateBody : INotifyParachuteLanded diff --git a/OpenRA.Mods.Common/Traits/Render/WithFacingSpriteBody.cs b/OpenRA.Mods.Common/Traits/Render/WithFacingSpriteBody.cs index 81622ae687..d1c9132d32 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithFacingSpriteBody.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithFacingSpriteBody.cs @@ -31,10 +31,10 @@ namespace OpenRA.Mods.Common.Traits yield return new SpriteActorPreview(anim, WVec.Zero, 0, p, rs.Scale); } - public override int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string race) + public override int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction) { var rsi = ai.Traits.Get(); - return sequenceProvider.GetSequence(rsi.GetImage(ai, sequenceProvider, race), Sequence).Facings; + return sequenceProvider.GetSequence(rsi.GetImage(ai, sequenceProvider, faction), Sequence).Facings; } } diff --git a/OpenRA.Mods.Common/Traits/Render/WithInfantryBody.cs b/OpenRA.Mods.Common/Traits/Render/WithInfantryBody.cs index 456c085a01..4ba38ac7d8 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithInfantryBody.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithInfantryBody.cs @@ -41,10 +41,10 @@ namespace OpenRA.Mods.Common.Traits yield return new SpriteActorPreview(anim, WVec.Zero, 0, p, rs.Scale); } - public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string race) + public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction) { var rsi = ai.Traits.Get(); - return sequenceProvider.GetSequence(rsi.GetImage(ai, sequenceProvider, race), StandSequences.First()).Facings; + return sequenceProvider.GetSequence(rsi.GetImage(ai, sequenceProvider, faction), StandSequences.First()).Facings; } } diff --git a/OpenRA.Mods.Common/Traits/Render/WithSpriteBody.cs b/OpenRA.Mods.Common/Traits/Render/WithSpriteBody.cs index b60f53a2a5..838b02faad 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithSpriteBody.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithSpriteBody.cs @@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Traits yield return new SpriteActorPreview(anim, WVec.Zero, 0, p, rs.Scale); } - public virtual int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string race) + public virtual int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction) { return 1; } diff --git a/OpenRA.Mods.Common/Traits/Render/WithVoxelBody.cs b/OpenRA.Mods.Common/Traits/Render/WithVoxelBody.cs index 0f44be7fae..3926876452 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithVoxelBody.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithVoxelBody.cs @@ -34,7 +34,7 @@ namespace OpenRA.Mods.Common.Traits () => false, () => 0); } - public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string race) { return 0; } + public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction) { return 0; } } public class WithVoxelBody : IAutoSelectionSize diff --git a/OpenRA.Mods.Common/Traits/World/MusicPlaylist.cs b/OpenRA.Mods.Common/Traits/World/MusicPlaylist.cs index af4af52c41..7993b1bbdd 100644 --- a/OpenRA.Mods.Common/Traits/World/MusicPlaylist.cs +++ b/OpenRA.Mods.Common/Traits/World/MusicPlaylist.cs @@ -103,7 +103,7 @@ namespace OpenRA.Mods.Common.Traits public MusicInfo[] AvailablePlaylist() { - // TO-DO: add filter options for Race-specific music + // TODO: add filter options for faction-specific music return playlist; } diff --git a/OpenRA.Mods.Common/Traits/World/SpawnMPUnits.cs b/OpenRA.Mods.Common/Traits/World/SpawnMPUnits.cs index 3c0c0daa5d..4e85827e8f 100644 --- a/OpenRA.Mods.Common/Traits/World/SpawnMPUnits.cs +++ b/OpenRA.Mods.Common/Traits/World/SpawnMPUnits.cs @@ -35,7 +35,7 @@ namespace OpenRA.Mods.Common.Traits .RandomOrDefault(w.SharedRandom); if (unitGroup == null) - throw new InvalidOperationException("No starting units defined for country {0} with class {1}".F(p.Faction.InternalName, spawnClass)); + throw new InvalidOperationException("No starting units defined for faction {0} with class {1}".F(p.Faction.InternalName, spawnClass)); if (unitGroup.BaseActor != null) { diff --git a/OpenRA.Mods.Common/UtilityCommands/LegacyMapImporter.cs b/OpenRA.Mods.Common/UtilityCommands/LegacyMapImporter.cs index 56f175f42a..49663e96ee 100644 --- a/OpenRA.Mods.Common/UtilityCommands/LegacyMapImporter.cs +++ b/OpenRA.Mods.Common/UtilityCommands/LegacyMapImporter.cs @@ -450,48 +450,48 @@ namespace OpenRA.Mods.Common.UtilityCommands void LoadPlayer(IniFile file, string section, bool isRA) { string c; - string race; + string faction; switch (section) { case "Spain": c = "gold"; - race = "allies"; + faction = "allies"; break; case "England": c = "green"; - race = "allies"; + faction = "allies"; break; case "Ukraine": c = "orange"; - race = "soviet"; + faction = "soviet"; break; case "Germany": c = "black"; - race = "allies"; + faction = "allies"; break; case "France": c = "teal"; - race = "allies"; + faction = "allies"; break; case "Turkey": c = "salmon"; - race = "allies"; + faction = "allies"; break; case "Greece": case "GoodGuy": c = isRA ? "blue" : "gold"; - race = isRA ? "allies" : "gdi"; + faction = isRA ? "allies" : "gdi"; break; case "USSR": case "BadGuy": c = "red"; - race = isRA ? "soviet" : "nod"; + faction = isRA ? "soviet" : "nod"; break; case "Special": case "Neutral": default: c = "neutral"; - race = isRA ? "allies" : "gdi"; + faction = isRA ? "allies" : "gdi"; break; } @@ -500,7 +500,7 @@ namespace OpenRA.Mods.Common.UtilityCommands Name = section, OwnsWorld = section == "Neutral", NonCombatant = section == "Neutral", - Faction = race, + Faction = faction, Color = namedColorMapping[c] }; diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/WorldTooltipLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/WorldTooltipLogic.cs index b37b5bcf0f..e2ce076818 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/WorldTooltipLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/WorldTooltipLogic.cs @@ -32,7 +32,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic var cachedWidth = 0; var labelText = ""; var showOwner = false; - var flagRace = ""; + var flagFaction = ""; var ownerName = ""; var ownerColor = Color.White; var extraText = ""; @@ -102,7 +102,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic if (showOwner) { - flagRace = o.Faction.InternalName; + flagFaction = o.Faction.InternalName; ownerName = o.PlayerName; ownerColor = o.Color.RGB; widget.Bounds.Height = doubleHeight; @@ -126,7 +126,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic label.GetText = () => labelText; flag.IsVisible = () => showOwner; flag.GetImageCollection = () => "flags"; - flag.GetImageName = () => flagRace; + flag.GetImageName = () => flagFaction; owner.IsVisible = () => showOwner; owner.GetText = () => ownerName; owner.GetColor = () => ownerColor; diff --git a/OpenRA.Mods.Common/Widgets/ObserverProductionIconsWidget.cs b/OpenRA.Mods.Common/Widgets/ObserverProductionIconsWidget.cs index 079a29510c..d44c9ab2bf 100644 --- a/OpenRA.Mods.Common/Widgets/ObserverProductionIconsWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ObserverProductionIconsWidget.cs @@ -67,13 +67,13 @@ namespace OpenRA.Mods.Common.Widgets if (current == null) continue; - var race = queue.Trait.Actor.Owner.Faction.InternalName; + var faction = queue.Trait.Actor.Owner.Faction.InternalName; var actor = queue.Trait.AllItems().FirstOrDefault(a => a.Name == current.Item); if (actor == null) continue; var rsi = actor.Traits.Get(); - var icon = new Animation(world, rsi.GetImage(actor, world.Map.SequenceProvider, race)); + var icon = new Animation(world, rsi.GetImage(actor, world.Map.SequenceProvider, faction)); icon.Play(actor.Traits.Get().Icon); var bi = actor.Traits.Get(); var location = new float2(RenderBounds.Location) + new float2(queue.i * (IconWidth + IconSpacing), 0); diff --git a/OpenRA.Mods.D2k/Traits/Buildings/ProductionFromMapEdge.cs b/OpenRA.Mods.D2k/Traits/Buildings/ProductionFromMapEdge.cs index b2a9852571..43990e4deb 100644 --- a/OpenRA.Mods.D2k/Traits/Buildings/ProductionFromMapEdge.cs +++ b/OpenRA.Mods.D2k/Traits/Buildings/ProductionFromMapEdge.cs @@ -27,7 +27,7 @@ namespace OpenRA.Mods.D2k.Traits public ProductionFromMapEdge(ActorInitializer init, ProductionInfo info) : base(init, info) { } - public override bool Produce(Actor self, ActorInfo producee, string raceVariant) + public override bool Produce(Actor self, ActorInfo producee, string factionVariant) { var location = self.World.Map.ChooseClosestEdgeCell(self.Location); var pos = self.World.Map.CenterOfCell(location); @@ -49,8 +49,8 @@ namespace OpenRA.Mods.D2k.Traits new FacingInit(initialFacing) }; - if (raceVariant != null) - td.Add(new FactionInit(raceVariant)); + if (factionVariant != null) + td.Add(new FactionInit(factionVariant)); var newUnit = self.World.CreateActor(producee.Name, td); diff --git a/OpenRA.Mods.TS/Traits/Render/WithVoxelUnloadBody.cs b/OpenRA.Mods.TS/Traits/Render/WithVoxelUnloadBody.cs index 3f2bf781e8..67610f4da5 100644 --- a/OpenRA.Mods.TS/Traits/Render/WithVoxelUnloadBody.cs +++ b/OpenRA.Mods.TS/Traits/Render/WithVoxelUnloadBody.cs @@ -37,7 +37,7 @@ namespace OpenRA.Mods.TS.Traits () => false, () => 0); } - public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string race) { return 0; } + public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction) { return 0; } } public class WithVoxelUnloadBody : IAutoSelectionSize diff --git a/OpenRA.Mods.TS/Traits/Render/WithVoxelWalkerBody.cs b/OpenRA.Mods.TS/Traits/Render/WithVoxelWalkerBody.cs index 15a2c9568f..e3e27e0a09 100644 --- a/OpenRA.Mods.TS/Traits/Render/WithVoxelWalkerBody.cs +++ b/OpenRA.Mods.TS/Traits/Render/WithVoxelWalkerBody.cs @@ -21,7 +21,7 @@ namespace OpenRA.Mods.TS.Traits public readonly int TickRate = 5; public object Create(ActorInitializer init) { return new WithVoxelWalkerBody(init.Self, this); } - public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string race) { return 0; } + public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction) { return 0; } } public class WithVoxelWalkerBody : IAutoSelectionSize, ITick diff --git a/OpenRA.Mods.TS/Traits/Render/WithVoxelWaterBody.cs b/OpenRA.Mods.TS/Traits/Render/WithVoxelWaterBody.cs index 1d57788525..387756235a 100644 --- a/OpenRA.Mods.TS/Traits/Render/WithVoxelWaterBody.cs +++ b/OpenRA.Mods.TS/Traits/Render/WithVoxelWaterBody.cs @@ -42,7 +42,7 @@ namespace OpenRA.Mods.TS.Traits () => false, () => 0); } - public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string race) { return 0; } + public int QuantizedBodyFacings(ActorInfo ai, SequenceProvider sequenceProvider, string faction) { return 0; } } public class WithVoxelWaterBody : IAutoSelectionSize