git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1200 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
@@ -12,11 +12,20 @@ namespace OpenRa.TechTree
|
||||
Dictionary<string, Item> objects = new Dictionary<string, Item>();
|
||||
public ICollection<string> built = new List<string>();
|
||||
|
||||
readonly Race currentRace;
|
||||
Race currentRace = Race.None;
|
||||
|
||||
public TechTree(Race race)
|
||||
public Race CurrentRace
|
||||
{
|
||||
get { return currentRace; }
|
||||
set
|
||||
{
|
||||
currentRace = value;
|
||||
CheckAll();
|
||||
}
|
||||
}
|
||||
|
||||
public TechTree()
|
||||
{
|
||||
this.currentRace = race;
|
||||
LoadRules();
|
||||
|
||||
built.Add("FACT");
|
||||
@@ -89,5 +98,25 @@ namespace OpenRa.TechTree
|
||||
yield return b;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<Item> BuildableBuildings
|
||||
{
|
||||
get
|
||||
{
|
||||
foreach (Item i in BuildableItems)
|
||||
if (i.IsStructure)
|
||||
yield return i;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<Item> BuildableUnits
|
||||
{
|
||||
get
|
||||
{
|
||||
foreach (Item i in BuildableItems)
|
||||
if (!i.IsStructure)
|
||||
yield return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user