Merge pull request #8661 from penev92/bleed_renameCountry
Rename the Country trait to Faction
This commit is contained in:
@@ -31,11 +31,11 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
var spawnClass = p.PlayerReference.StartingUnitsClass ?? w.LobbyInfo.GlobalSettings.StartingUnitsClass;
|
||||
var unitGroup = w.Map.Rules.Actors["world"].Traits.WithInterface<MPStartUnitsInfo>()
|
||||
.Where(g => g.Class == spawnClass && g.Races != null && g.Races.Contains(p.Country.Race))
|
||||
.Where(g => g.Class == spawnClass && g.Races != null && g.Races.Contains(p.Country.InternalName))
|
||||
.RandomOrDefault(w.SharedRandom);
|
||||
|
||||
if (unitGroup == null)
|
||||
throw new InvalidOperationException("No starting units defined for country {0} with class {1}".F(p.Country.Race, spawnClass));
|
||||
throw new InvalidOperationException("No starting units defined for country {0} with class {1}".F(p.Country.InternalName, spawnClass));
|
||||
|
||||
if (unitGroup.BaseActor != null)
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public void WorldLoaded(World world, WorldRenderer wr)
|
||||
{
|
||||
Sound.PlayNotification(world.Map.Rules, null, "Speech", info.Notification, world.RenderPlayer == null ? null : world.RenderPlayer.Country.Race);
|
||||
Sound.PlayNotification(world.Map.Rules, null, "Speech", info.Notification, world.RenderPlayer == null ? null : world.RenderPlayer.Country.InternalName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user