Rules.Categories

This commit is contained in:
Bob
2009-10-30 07:32:19 +13:00
parent accb391c6c
commit 7b28ab7979
4 changed files with 30 additions and 33 deletions

View File

@@ -34,10 +34,8 @@ namespace OpenRa.TechTree
void LoadRules()
{
var allBuildings = Rules.Categories["BuildingTypes"];
foreach( var unit in Rules.UnitInfo )
objects.Add( unit.Key, new Item( unit.Key, unit.Value, allBuildings.Contains( unit.Key ) ) );
objects.Add( unit.Key, new Item( unit.Key, unit.Value, Rules.UnitCategory[ unit.Key ] == "Building" ) );
}
public bool Build(string key, bool force)