Add an `Undamaged' damagestate to simplify things related to healing.

This commit is contained in:
Paul Chote
2010-07-30 01:22:41 +12:00
parent 87d2071007
commit 98ac5a036f
10 changed files with 27 additions and 29 deletions

View File

@@ -46,7 +46,7 @@ namespace OpenRA.Mods.RA
bool CanRepair(Actor self)
{
var li = self.traits.GetOrDefault<LimitedAmmo>();
return (Health.HPFraction < 1f || (li != null && !li.FullAmmo()) );
return (Health.ExtendedDamageState != ExtendedDamageState.Undamaged || (li != null && !li.FullAmmo()) );
}
public string CursorForOrder(Actor self, Order order)