Rename Player.Country to Player.Faction

This commit is contained in:
penev92
2015-07-15 04:06:52 +03:00
parent 2e1c1533a5
commit bb648decc3
48 changed files with 75 additions and 75 deletions

View File

@@ -19,8 +19,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
public AddRaceSuffixLogic(Widget widget, World world)
{
string race;
if (!ChromeMetrics.TryGet("RaceSuffix-" + world.LocalPlayer.Country.InternalName, out race))
race = world.LocalPlayer.Country.InternalName;
if (!ChromeMetrics.TryGet("RaceSuffix-" + world.LocalPlayer.Faction.InternalName, out race))
race = world.LocalPlayer.Faction.InternalName;
var suffix = "-" + race;
if (widget is ButtonWidget)

View File

@@ -62,8 +62,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
flag.GetImageCollection = () => "flags";
if (lp.Stances[pp] == Stance.Ally || lp.WinState != WinState.Undefined)
{
flag.GetImageName = () => pp.Country.InternalName;
item.Get<LabelWidget>("FACTION").GetText = () => pp.Country.Name;
flag.GetImageName = () => pp.Faction.InternalName;
item.Get<LabelWidget>("FACTION").GetText = () => pp.Faction.Name;
}
else
{

View File

@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
Action onQuit = () =>
{
if (world.Type == WorldType.Regular)
Sound.PlayNotification(world.Map.Rules, null, "Speech", "Leave", world.LocalPlayer == null ? null : world.LocalPlayer.Country.InternalName);
Sound.PlayNotification(world.Map.Rules, null, "Speech", "Leave", world.LocalPlayer == null ? null : world.LocalPlayer.Faction.InternalName);
resumeDisabled = true;

View File

@@ -104,7 +104,7 @@ namespace OpenRA.Mods.Common.Widgets
if (world.Type == WorldType.Regular)
Sound.PlayNotification(world.Map.Rules, null, "Speech", "Leave",
world.LocalPlayer == null ? null : world.LocalPlayer.Country.InternalName);
world.LocalPlayer == null ? null : world.LocalPlayer.Faction.InternalName);
var exitDelay = iop != null ? iop.ExitDelay : 0;
if (mpe != null)

View File

@@ -37,7 +37,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
Player = p;
Label = p.PlayerName;
Color = p.Color.RGB;
Race = p.Country.InternalName;
Race = p.Faction.InternalName;
IsSelected = () => p.World.RenderPlayer == p;
OnClick = () => { p.World.RenderPlayer = p; logic.selected = this; p.World.Selection.Clear(); };
}

View File

@@ -102,7 +102,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
if (showOwner)
{
flagRace = o.Country.InternalName;
flagRace = o.Faction.InternalName;
ownerName = o.PlayerName;
ownerColor = o.Color.RGB;
widget.Bounds.Height = doubleHeight;

View File

@@ -458,7 +458,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
if (player.World.RenderPlayer != null && player.World.RenderPlayer.Stances[player] != Stance.Ally)
flag.GetImageName = () => player.DisplayCountry.InternalName;
else
flag.GetImageName = () => player.Country.InternalName;
flag.GetImageName = () => player.Faction.InternalName;
var playerName = template.Get<LabelWidget>("PLAYER");
var client = player.World.LobbyInfo.ClientWithIndex(player.ClientIndex);

View File

@@ -67,7 +67,7 @@ namespace OpenRA.Mods.Common.Widgets
if (current == null)
continue;
var race = queue.Trait.Actor.Owner.Country.InternalName;
var race = queue.Trait.Actor.Owner.Faction.InternalName;
var actor = queue.Trait.AllItems().FirstOrDefault(a => a.Name == current.Item);
if (actor == null)
continue;

View File

@@ -226,7 +226,7 @@ namespace OpenRA.Mods.Common.Widgets
{
// Queue a new item
Sound.Play(TabClick);
Sound.PlayNotification(World.Map.Rules, World.LocalPlayer, "Speech", CurrentQueue.Info.QueuedAudio, World.LocalPlayer.Country.InternalName);
Sound.PlayNotification(World.Map.Rules, World.LocalPlayer, "Speech", CurrentQueue.Info.QueuedAudio, World.LocalPlayer.Faction.InternalName);
World.IssueOrder(Order.StartProduction(CurrentQueue.Actor, icon.Name,
handleMultiple ? 5 : 1));
return true;
@@ -245,14 +245,14 @@ namespace OpenRA.Mods.Common.Widgets
if (item.Paused || item.Done || item.TotalCost == item.RemainingCost)
{
// Instant cancel of things we have not started yet and things that are finished
Sound.PlayNotification(World.Map.Rules, World.LocalPlayer, "Speech", CurrentQueue.Info.CancelledAudio, World.LocalPlayer.Country.InternalName);
Sound.PlayNotification(World.Map.Rules, World.LocalPlayer, "Speech", CurrentQueue.Info.CancelledAudio, World.LocalPlayer.Faction.InternalName);
World.IssueOrder(Order.CancelProduction(CurrentQueue.Actor, icon.Name,
handleMultiple ? 5 : 1));
}
else
{
// Pause an existing item
Sound.PlayNotification(World.Map.Rules, World.LocalPlayer, "Speech", CurrentQueue.Info.OnHoldAudio, World.LocalPlayer.Country.InternalName);
Sound.PlayNotification(World.Map.Rules, World.LocalPlayer, "Speech", CurrentQueue.Info.OnHoldAudio, World.LocalPlayer.Faction.InternalName);
World.IssueOrder(Order.PauseProduction(CurrentQueue.Actor, icon.Name, true));
}