start hacking up lobby to work with slots (cnc only)

This commit is contained in:
Chris Forbes
2010-08-23 21:54:55 +12:00
parent 4a337185f5
commit 39f699916c
3 changed files with 36 additions and 7 deletions

View File

@@ -34,6 +34,9 @@ namespace OpenRA.Traits
public void Tick( Player owner, Cache<string, List<Actor>> buildings )
{
if (owner.Country == null)
return;
var effectivePrereq = prerequisites.Where( a => a.Traits.Get<BuildableInfo>().Owner.Contains( owner.Country.Race ) );
var nowHasPrerequisites = effectivePrereq.Any() &&
effectivePrereq.All( a => buildings[ a.Name ].Any( b => !b.Trait<Building>().Disabled ) );