Tie Minimap to ProvidesRadar trait

This commit is contained in:
Paul Chote
2010-01-04 21:35:33 +13:00
parent 5fdba51536
commit bfc7974419
4 changed files with 39 additions and 5 deletions

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OpenRa.Game.Traits
{
class ProvidesRadar
{
Actor self;
public ProvidesRadar(Actor self)
{
this.self = self;
}
public bool IsActive()
{
// TODO: Check for nearby MRJ
// Check if powered
var b = self.traits.Get<Building>();
if (b != null && b.InsuffientPower())
return false;
return true;
}
}
}