Rename the Country trait to Faction
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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 ||
|
||||
|
||||
Reference in New Issue
Block a user