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

This commit is contained in:
(no author)
2007-07-24 06:08:44 +00:00
parent c725811bbe
commit a5cc26df09
13 changed files with 116 additions and 23 deletions

View File

@@ -65,8 +65,9 @@ namespace OpenRa.TechTree
public bool Build(string key, bool force)
{
if (string.IsNullOrEmpty(key)) return false;
Item b = objects[key];
if( string.IsNullOrEmpty( key ) ) return false;
key = key.ToUpperInvariant();
Item b = objects[ key ];
if (!force && !b.CanBuild) return false;
built.Add(key);
CheckAll();
@@ -80,6 +81,7 @@ namespace OpenRa.TechTree
public bool Unbuild(string key)
{
key = key.ToUpperInvariant();
Item b = objects[key];
if (!built.Contains(key)) return false;
built.Remove(key);