Some internal "race" to "faction" renaming

This commit is contained in:
Pavel Penev
2015-08-22 02:32:37 +03:00
parent d803a06a1e
commit 09f67d18bb
29 changed files with 75 additions and 75 deletions

View File

@@ -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;

View File

@@ -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<RenderSpritesInfo>();
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<TooltipInfo>().Icon);
var bi = actor.Traits.Get<BuildableInfo>();
var location = new float2(RenderBounds.Location) + new float2(queue.i * (IconWidth + IconSpacing), 0);