Rename the Country trait to Faction

This commit is contained in:
penev92
2015-07-06 01:48:54 +03:00
parent b58d1037ea
commit a1af5386e0
7 changed files with 17 additions and 17 deletions

View File

@@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.Lint
var worldActor = map.Rules.Actors["world"];
var races = worldActor.Traits.WithInterface<CountryInfo>().Select(c => c.Race);
var races = worldActor.Traits.WithInterface<FactionInfo>().Select(c => c.Race);
foreach (var player in players.Values)
if (!string.IsNullOrWhiteSpace(player.Race) && !races.Contains(player.Race))
emitError("Invalid race {0} chosen for player {1}.".F(player.Race, player.Name));

View File

@@ -30,7 +30,7 @@ namespace OpenRA.Mods.Common.Lint
sequenceDefinitions = MiniYaml.MergeLiberal(map.SequenceDefinitions,
Game.ModData.Manifest.Sequences.Select(s => MiniYaml.FromFile(s)).Aggregate(MiniYaml.MergeLiberal));
var races = map.Rules.Actors["world"].Traits.WithInterface<CountryInfo>().Select(c => c.Race);
var races = map.Rules.Actors["world"].Traits.WithInterface<FactionInfo>().Select(c => c.Race);
foreach (var actorInfo in map.Rules.Actors)
{

View File

@@ -144,8 +144,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
colorPreview = lobby.Get<ColorPreviewManagerWidget>("COLOR_MANAGER");
colorPreview.Color = Game.Settings.Player.Color;
foreach (var c in modRules.Actors["world"].Traits.WithInterface<CountryInfo>())
countries.Add(c.Race, new LobbyCountry { Selectable = c.Selectable, Name = c.Name, Side = c.Side, Description = c.Description });
foreach (var f in modRules.Actors["world"].Traits.WithInterface<FactionInfo>())
countries.Add(f.Race, new LobbyCountry { Selectable = f.Selectable, Name = f.Name, Side = f.Side, Description = f.Description });
var gameStarting = false;
Func<bool> configurationDisabled = () => !Game.IsHost || gameStarting ||