Rename Player.Country to Player.Faction
This commit is contained in:
@@ -113,12 +113,12 @@ namespace OpenRA
|
||||
Name = runtimePlayer.PlayerName,
|
||||
IsHuman = !runtimePlayer.IsBot,
|
||||
IsBot = runtimePlayer.IsBot,
|
||||
FactionName = runtimePlayer.Country.Name,
|
||||
FactionId = runtimePlayer.Country.InternalName,
|
||||
FactionName = runtimePlayer.Faction.Name,
|
||||
FactionId = runtimePlayer.Faction.InternalName,
|
||||
Color = runtimePlayer.Color,
|
||||
Team = client.Team,
|
||||
SpawnPoint = runtimePlayer.SpawnPoint,
|
||||
IsRandomFaction = runtimePlayer.Country.InternalName != client.Race,
|
||||
IsRandomFaction = runtimePlayer.Faction.InternalName != client.Race,
|
||||
IsRandomSpawnPoint = runtimePlayer.SpawnPoint != client.SpawnPoint
|
||||
};
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace OpenRA
|
||||
|
||||
public readonly string PlayerName;
|
||||
public readonly string InternalName;
|
||||
public readonly FactionInfo Country;
|
||||
public readonly FactionInfo Faction;
|
||||
public readonly bool NonCombatant = false;
|
||||
public readonly bool Playable = true;
|
||||
public readonly int ClientIndex;
|
||||
@@ -95,7 +95,7 @@ namespace OpenRA
|
||||
Color = client.Color;
|
||||
PlayerName = client.Name;
|
||||
botType = client.Bot;
|
||||
Country = ChooseCountry(world, client.Race, !pr.LockFaction);
|
||||
Faction = ChooseCountry(world, client.Race, !pr.LockFaction);
|
||||
DisplayCountry = ChooseDisplayCountry(world, client.Race);
|
||||
}
|
||||
else
|
||||
@@ -108,7 +108,7 @@ namespace OpenRA
|
||||
Playable = pr.Playable;
|
||||
Spectating = pr.Spectating;
|
||||
botType = pr.Bot;
|
||||
Country = ChooseCountry(world, pr.Faction, false);
|
||||
Faction = ChooseCountry(world, pr.Faction, false);
|
||||
DisplayCountry = ChooseDisplayCountry(world, pr.Faction);
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace OpenRA.Traits
|
||||
{
|
||||
this.info = info;
|
||||
var self = init.Self;
|
||||
var race = init.Contains<RaceInit>() ? init.Get<RaceInit, string>() : self.Owner.Country.InternalName;
|
||||
var race = init.Contains<RaceInit>() ? init.Get<RaceInit, string>() : self.Owner.Faction.InternalName;
|
||||
|
||||
quantizedFacings = Exts.Lazy(() =>
|
||||
{
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace OpenRA.Traits
|
||||
{
|
||||
if (Resources > 0.8 * ResourceCapacity)
|
||||
{
|
||||
Sound.PlayNotification(self.World.Map.Rules, owner, "Speech", "SilosNeeded", owner.Country.InternalName);
|
||||
Sound.PlayNotification(self.World.Map.Rules, owner, "Speech", "SilosNeeded", owner.Faction.InternalName);
|
||||
AlertSilo = true;
|
||||
}
|
||||
else
|
||||
@@ -187,14 +187,14 @@ namespace OpenRA.Traits
|
||||
public void PlayCashTickUp(Actor self)
|
||||
{
|
||||
if (Game.Settings.Sound.CashTicks)
|
||||
Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Sounds", "CashTickUp", self.Owner.Country.InternalName);
|
||||
Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Sounds", "CashTickUp", self.Owner.Faction.InternalName);
|
||||
}
|
||||
|
||||
public void PlayCashTickDown(Actor self)
|
||||
{
|
||||
if (Game.Settings.Sound.CashTicks && nextCashTickTime == 0)
|
||||
{
|
||||
Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Sounds", "CashTickDown", self.Owner.Country.InternalName);
|
||||
Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Sounds", "CashTickDown", self.Owner.Faction.InternalName);
|
||||
nextCashTickTime = 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace OpenRA
|
||||
if (string.IsNullOrEmpty(voiced.VoiceSet))
|
||||
return;
|
||||
|
||||
voiced.PlayVoice(self, phrase, self.Owner.Country.InternalName);
|
||||
voiced.PlayVoice(self, phrase, self.Owner.Faction.InternalName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace OpenRA
|
||||
if (string.IsNullOrEmpty(voiced.VoiceSet))
|
||||
return;
|
||||
|
||||
voiced.PlayVoiceLocal(self, phrase, self.Owner.Country.InternalName, volume);
|
||||
voiced.PlayVoiceLocal(self, phrase, self.Owner.Faction.InternalName, volume);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace OpenRA
|
||||
foreach (var v in orderSubject.TraitsImplementing<IOrderVoice>())
|
||||
{
|
||||
if (voice.PlayVoice(orderSubject, v.VoicePhraseForOrder(orderSubject, o),
|
||||
orderSubject.Owner.Country.InternalName))
|
||||
orderSubject.Owner.Faction.InternalName))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace OpenRA.Widgets
|
||||
{
|
||||
public static Sprite GetChromeImage(World world, string name)
|
||||
{
|
||||
return ChromeProvider.GetImage("chrome-" + world.LocalPlayer.Country.InternalName, name);
|
||||
return ChromeProvider.GetImage("chrome-" + world.LocalPlayer.Faction.InternalName, name);
|
||||
}
|
||||
|
||||
public static void DrawRGBA(Sprite s, float2 pos)
|
||||
|
||||
Reference in New Issue
Block a user