Fix INotifyRepair argument order.
This commit is contained in:
@@ -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); }
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user