git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1212 993157c7-ee19-0410-b2c4-bb4e9862e678

This commit is contained in:
beedee
2007-07-13 17:20:57 +00:00
parent 45d4079741
commit f7bff84ce2
3 changed files with 16 additions and 10 deletions

View File

@@ -27,8 +27,6 @@ namespace OpenRa.TechTree
public TechTree()
{
LoadRules();
built.Add("FACT");
CheckAll();
}
@@ -65,15 +63,20 @@ namespace OpenRa.TechTree
objects.Add(p.a, new Item(p.a, p.b, rulesFile.GetSection(p.a), p.c));
}
public bool Build(string key)
public bool Build(string key, bool force)
{
Item b = objects[key];
if (!b.CanBuild) return false;
if (!force && !b.CanBuild) return false;
built.Add(key);
CheckAll();
return true;
}
public bool Build(string key)
{
return Build(key, false);
}
public bool Unbuild(string key)
{
Item b = objects[key];