Can now set the race of the TechTree

git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1139 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
beedee
2007-07-07 08:30:47 +00:00
parent 9484b231e3
commit 27c74b1ef1
3 changed files with 8 additions and 5 deletions

View File

@@ -90,9 +90,9 @@ namespace OpenRa.TechTreeTest
bool buildable = false;
public bool Buildable { get { return buildable; } }
public void CheckPrerequisites(IEnumerable<string> buildings)
public void CheckPrerequisites(IEnumerable<string> buildings, BuildingRace currentRace)
{
if (buildable && ShouldMakeUnbuildable(buildings))
if ((buildable && ShouldMakeUnbuildable(buildings)) || !((owner & currentRace) == currentRace))
buildable = false;
else if (!buildable && ShouldMakeBuildable(buildings))
buildable = true;