Make INotifyAppliedDamage require explicit implementation

This commit is contained in:
reaperrr
2018-04-29 04:46:42 +02:00
committed by Paul Chote
parent 3a82b13093
commit 83f100618b
2 changed files with 2 additions and 1 deletions

View File

@@ -37,7 +37,7 @@ namespace OpenRA.Mods.Common.Traits.Sound
lastAnnounce = -info.Interval * 25; lastAnnounce = -info.Interval * 25;
} }
public void AppliedDamage(Actor self, Actor damaged, AttackInfo e) void INotifyAppliedDamage.AppliedDamage(Actor self, Actor damaged, AttackInfo e)
{ {
// Don't notify suicides // Don't notify suicides
if (e.DamageState == DamageState.Dead && damaged != e.Attacker) if (e.DamageState == DamageState.Dead && damaged != e.Attacker)

View File

@@ -87,6 +87,7 @@ namespace OpenRA.Mods.Common.Traits
public interface INotifyDamage { void Damaged(Actor self, AttackInfo e); } public interface INotifyDamage { void Damaged(Actor self, AttackInfo e); }
[RequireExplicitImplementation] [RequireExplicitImplementation]
public interface INotifyKilled { void Killed(Actor self, AttackInfo e); } public interface INotifyKilled { void Killed(Actor self, AttackInfo e); }
[RequireExplicitImplementation]
public interface INotifyAppliedDamage { void AppliedDamage(Actor self, Actor damaged, AttackInfo e); } public interface INotifyAppliedDamage { void AppliedDamage(Actor self, Actor damaged, AttackInfo e); }
[RequireExplicitImplementation] [RequireExplicitImplementation]