Rename PlayerReference.Race and LockRace to Faction and LockFaction

This commit is contained in:
penev92
2015-07-05 23:08:49 +03:00
parent b4c1625f1c
commit 1d49c23af0
14 changed files with 26 additions and 26 deletions

View File

@@ -37,7 +37,7 @@ namespace OpenRA
"Neutral", new PlayerReference
{
Name = "Neutral",
Race = firstRace,
Faction = firstRace,
OwnsWorld = true,
NonCombatant = true
}
@@ -46,7 +46,7 @@ namespace OpenRA
"Creeps", new PlayerReference
{
Name = "Creeps",
Race = firstRace,
Faction = firstRace,
NonCombatant = true,
Enemies = Exts.MakeArray(playerCount, i => "Multi{0}".F(i))
}
@@ -58,7 +58,7 @@ namespace OpenRA
var p = new PlayerReference
{
Name = "Multi{0}".F(index),
Race = "Random",
Faction = "Random",
Playable = true,
Enemies = new[] { "Creeps" }
};

View File

@@ -16,17 +16,17 @@ namespace OpenRA
{
public string Name;
public string Palette;
public bool OwnsWorld = false;
public bool NonCombatant = false;
public bool Playable = false;
public bool Spectating = false;
public string Bot = null;
public string StartingUnitsClass = null;
public bool AllowBots = true;
public bool Playable = false;
public bool Required = false;
public bool OwnsWorld = false;
public bool Spectating = false;
public bool NonCombatant = false;
public bool LockRace = false;
public string Race;
public bool LockFaction = false;
public string Faction;
// ColorRamp naming retained for backward compatibility
public bool LockColor = false;

View File

@@ -95,7 +95,7 @@ namespace OpenRA
Color = client.Color;
PlayerName = client.Name;
botType = client.Bot;
Country = ChooseCountry(world, client.Race, !pr.LockRace);
Country = ChooseCountry(world, client.Race, !pr.LockFaction);
DisplayCountry = ChooseDisplayCountry(world, client.Race);
}
else
@@ -108,8 +108,8 @@ namespace OpenRA
Playable = pr.Playable;
Spectating = pr.Spectating;
botType = pr.Bot;
Country = ChooseCountry(world, pr.Race, false);
DisplayCountry = ChooseDisplayCountry(world, pr.Race);
Country = ChooseCountry(world, pr.Faction, false);
DisplayCountry = ChooseDisplayCountry(world, pr.Faction);
}
PlayerActor = world.CreateActor("Player", new TypeDictionary { new OwnerInit(this) });

View File

@@ -72,8 +72,8 @@ namespace OpenRA.Server
if (pr == null)
return;
if (pr.LockRace)
c.Race = pr.Race;
if (pr.LockFaction)
c.Race = pr.Faction;
if (pr.LockSpawn)
c.SpawnPoint = pr.Spawn;
if (pr.LockTeam)