Refactored Health usage to IHealth.

This commit is contained in:
Andre Mohren
2018-09-27 02:02:08 +02:00
committed by reaperrr
parent 83cd7cf485
commit 640078a2b1
30 changed files with 68 additions and 61 deletions

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Common.Activities
{
public class Repair : Activity
{
readonly Health health;
readonly IHealth health;
readonly RepairsUnits[] allRepairsUnits;
readonly Target host;
readonly WDist closeEnough;
@@ -33,7 +33,7 @@ namespace OpenRA.Mods.Common.Activities
this.host = Target.FromActor(host);
this.closeEnough = closeEnough;
allRepairsUnits = host.TraitsImplementing<RepairsUnits>().ToArray();
health = self.TraitOrDefault<Health>();
health = self.TraitOrDefault<IHealth>();
repairable = self.TraitOrDefault<Repairable>();
}