Merge pull request #8975 from penev92/bleed_rename

Some more renaming from "country" and "race" to "faction"
This commit is contained in:
Matthias Mailänder
2015-08-08 16:13:16 +02:00
11 changed files with 49 additions and 48 deletions

View File

@@ -37,7 +37,7 @@ namespace OpenRA
public IEnumerable<Player> HumanPlayers { get { return Players.Where(p => p.IsHuman); } }
public bool IsSinglePlayer { get { return HumanPlayers.Count() == 1; } }
Dictionary<OpenRA.Player, Player> playersByRuntime;
readonly Dictionary<OpenRA.Player, Player> playersByRuntime;
public GameInformation()
{
@@ -79,9 +79,10 @@ namespace OpenRA
public string Serialize()
{
var nodes = new List<MiniYamlNode>();
nodes.Add(new MiniYamlNode("Root", FieldSaver.Save(this)));
var nodes = new List<MiniYamlNode>
{
new MiniYamlNode("Root", FieldSaver.Save(this))
};
for (var i = 0; i < Players.Count; i++)
nodes.Add(new MiniYamlNode("Player@{0}".F(i), FieldSaver.Save(Players[i])));
@@ -118,7 +119,7 @@ namespace OpenRA
Color = runtimePlayer.Color,
Team = client.Team,
SpawnPoint = runtimePlayer.SpawnPoint,
IsRandomFaction = runtimePlayer.Faction.InternalName != client.Race,
IsRandomFaction = runtimePlayer.Faction.InternalName != client.Faction,
IsRandomSpawnPoint = runtimePlayer.SpawnPoint != client.SpawnPoint
};

View File

@@ -102,13 +102,13 @@ namespace OpenRA.Network
public int Index;
public HSLColor PreferredColor; // Color that the client normally uses from settings.yaml.
public HSLColor Color; // Actual color that the client is using. Usually the same as PreferredColor but can be different on maps with locked colors.
public string Race;
public string Faction;
public int SpawnPoint;
public string Name;
public string IpAddress;
public ClientState State = ClientState.Invalid;
public int Team;
public string Slot; // slot ID, or null for observer
public string Slot; // Slot ID, or null for observer
public string Bot; // Bot type, null for real clients
public int BotControllerClientIndex; // who added the bot to the slot
public bool IsAdmin;
@@ -118,7 +118,7 @@ namespace OpenRA.Network
public MiniYamlNode Serialize()
{
return new MiniYamlNode("Client@{0}".F(this.Index), FieldSaver.Save(this));
return new MiniYamlNode("Client@{0}".F(Index), FieldSaver.Save(this));
}
}
@@ -141,17 +141,17 @@ namespace OpenRA.Network
public MiniYamlNode Serialize()
{
return new MiniYamlNode("ClientPing@{0}".F(this.Index), FieldSaver.Save(this));
return new MiniYamlNode("ClientPing@{0}".F(Index), FieldSaver.Save(this));
}
}
public class Slot
{
public string PlayerReference; // playerReference to bind against.
public bool Closed; // host has explicitly closed this slot.
public string PlayerReference; // PlayerReference to bind against.
public bool Closed; // Host has explicitly closed this slot.
public bool AllowBots;
public bool LockRace;
public bool LockFaction;
public bool LockColor;
public bool LockTeam;
public bool LockSpawn;
@@ -164,7 +164,7 @@ namespace OpenRA.Network
public MiniYamlNode Serialize()
{
return new MiniYamlNode("Slot@{0}".F(this.PlayerReference), FieldSaver.Save(this));
return new MiniYamlNode("Slot@{0}".F(PlayerReference), FieldSaver.Save(this));
}
}

View File

@@ -161,7 +161,7 @@ namespace OpenRA.Network
Name = Game.Settings.Player.Name,
PreferredColor = Game.Settings.Player.Color,
Color = Game.Settings.Player.Color,
Race = "Random",
Faction = "Random",
SpawnPoint = 0,
Team = 0,
State = Session.ClientState.Invalid

View File

@@ -95,8 +95,8 @@ namespace OpenRA
Color = client.Color;
PlayerName = client.Name;
botType = client.Bot;
Faction = ChooseFaction(world, client.Race, !pr.LockFaction);
DisplayFaction = ChooseDisplayFaction(world, client.Race);
Faction = ChooseFaction(world, client.Faction, !pr.LockFaction);
DisplayFaction = ChooseDisplayFaction(world, client.Faction);
}
else
{

View File

@@ -73,7 +73,7 @@ namespace OpenRA.Server
return;
if (pr.LockFaction)
c.Race = pr.Faction;
c.Faction = pr.Faction;
if (pr.LockSpawn)
c.SpawnPoint = pr.Spawn;
if (pr.LockTeam)
@@ -308,7 +308,7 @@ namespace OpenRA.Server
Slot = LobbyInfo.FirstEmptySlot(),
PreferredColor = handshake.Client.Color,
Color = handshake.Client.Color,
Race = "Random",
Faction = "Random",
SpawnPoint = 0,
Team = 0,
State = Session.ClientState.Invalid,