Rename MPStartUnitsInfo.Races to Factions

Also add an upgrade rule.
This commit is contained in:
Pavel Penev
2015-08-11 04:00:08 +03:00
parent fd01e95d6c
commit 4d11195989
7 changed files with 39 additions and 32 deletions

View File

@@ -31,7 +31,7 @@ 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.Faction.InternalName))
.Where(g => g.Class == spawnClass && g.Factions != null && g.Factions.Contains(p.Faction.InternalName))
.RandomOrDefault(w.SharedRandom);
if (unitGroup == null)