diff --git a/OpenRa.Game/GameRules/UnitInfo.cs b/OpenRa.Game/GameRules/UnitInfo.cs index d4893ac17c..7da2ac2480 100755 --- a/OpenRa.Game/GameRules/UnitInfo.cs +++ b/OpenRa.Game/GameRules/UnitInfo.cs @@ -35,7 +35,7 @@ namespace OpenRa.Game.GameRules public readonly bool Invisible = false; public readonly string Owner = "allies,soviet"; // TODO: make this an enum public readonly int Points = 0; - public readonly string Prerequisite = ""; + public readonly string[] Prerequisite = new string[ 0 ]; public readonly string Primary = null; public readonly string Secondary = null; public readonly int ROT = 0; diff --git a/OpenRa.Game/TechTree/Item.cs b/OpenRa.Game/TechTree/Item.cs index cf09781cd7..a76fe37767 100755 --- a/OpenRa.Game/TechTree/Item.cs +++ b/OpenRa.Game/TechTree/Item.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using OpenRa.FileFormats; using OpenRa.Game.GameRules; @@ -38,11 +39,9 @@ namespace OpenRa.TechTree return race; } - static Tuple ParsePrerequisites(string prerequisites, string tag) + static Tuple ParsePrerequisites(string[] prerequisites, string tag) { - List allied = new List(prerequisites.ToLowerInvariant().Split( - new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries)); - + List allied = prerequisites.Select( x => x.ToLowerInvariant() ).ToList(); List soviet = new List(allied); if (allied.Remove("stek"))