Fix INotifyRepair argument order.

This commit is contained in:
Paul Chote
2016-07-09 11:12:56 +01:00
parent 7325f0e733
commit b0c9d49d14
3 changed files with 4 additions and 4 deletions

View File

@@ -129,7 +129,7 @@ namespace OpenRA.Traits
public interface INotifySold { void Selling(Actor self); void Sold(Actor self); } public interface INotifySold { void Selling(Actor self); void Sold(Actor self); }
public interface INotifyDamage { void Damaged(Actor self, AttackInfo e); } public interface INotifyDamage { void Damaged(Actor self, AttackInfo e); }
public interface INotifyDamageStateChanged { void DamageStateChanged(Actor self, AttackInfo e); } public interface INotifyDamageStateChanged { void DamageStateChanged(Actor self, AttackInfo e); }
public interface INotifyRepair { void Repairing(Actor self, Actor host); } public interface INotifyRepair { void Repairing(Actor self, Actor target); }
public interface INotifyKilled { void Killed(Actor self, AttackInfo e); } public interface INotifyKilled { void Killed(Actor self, AttackInfo e); }
public interface INotifyActorDisposing { void Disposing(Actor self); } public interface INotifyActorDisposing { void Disposing(Actor self); }
public interface INotifyAppliedDamage { void AppliedDamage(Actor self, Actor damaged, AttackInfo e); } public interface INotifyAppliedDamage { void AppliedDamage(Actor self, Actor damaged, AttackInfo e); }

View File

@@ -74,7 +74,7 @@ namespace OpenRA.Mods.Common.Activities
self.InflictDamage(self, -hpToRepair, null); self.InflictDamage(self, -hpToRepair, null);
foreach (var depot in host.TraitsImplementing<INotifyRepair>()) foreach (var depot in host.TraitsImplementing<INotifyRepair>())
depot.Repairing(self, host); depot.Repairing(host, self);
remainingTicks = repairsUnits.Interval; remainingTicks = repairsUnits.Interval;
} }

View File

@@ -36,10 +36,10 @@ namespace OpenRA.Mods.Common.Traits.Render
spriteBody = self.TraitOrDefault<WithSpriteBody>(); spriteBody = self.TraitOrDefault<WithSpriteBody>();
} }
public void Repairing(Actor self, Actor host) public void Repairing(Actor self, Actor target)
{ {
if (buildComplete && spriteBody != null && !(info.PauseOnLowPower && self.IsDisabled())) if (buildComplete && spriteBody != null && !(info.PauseOnLowPower && self.IsDisabled()))
spriteBody.PlayCustomAnimation(host, info.Sequence, () => spriteBody.CancelCustomAnimation(host)); spriteBody.PlayCustomAnimation(self, info.Sequence, () => spriteBody.CancelCustomAnimation(self));
} }
public void BuildingComplete(Actor self) public void BuildingComplete(Actor self)