From 83f100618b1131219f07f9f0da6070be6321cbe3 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Sun, 29 Apr 2018 04:46:42 +0200 Subject: [PATCH] Make INotifyAppliedDamage require explicit implementation --- OpenRA.Mods.Common/Traits/Sound/AnnounceOnKill.cs | 2 +- OpenRA.Mods.Common/TraitsInterfaces.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/Sound/AnnounceOnKill.cs b/OpenRA.Mods.Common/Traits/Sound/AnnounceOnKill.cs index f7f38b014f..9d73077b6d 100644 --- a/OpenRA.Mods.Common/Traits/Sound/AnnounceOnKill.cs +++ b/OpenRA.Mods.Common/Traits/Sound/AnnounceOnKill.cs @@ -37,7 +37,7 @@ namespace OpenRA.Mods.Common.Traits.Sound 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 if (e.DamageState == DamageState.Dead && damaged != e.Attacker) diff --git a/OpenRA.Mods.Common/TraitsInterfaces.cs b/OpenRA.Mods.Common/TraitsInterfaces.cs index 91c2376df5..309db1a746 100644 --- a/OpenRA.Mods.Common/TraitsInterfaces.cs +++ b/OpenRA.Mods.Common/TraitsInterfaces.cs @@ -87,6 +87,7 @@ namespace OpenRA.Mods.Common.Traits public interface INotifyDamage { void Damaged(Actor self, AttackInfo e); } [RequireExplicitImplementation] public interface INotifyKilled { void Killed(Actor self, AttackInfo e); } + [RequireExplicitImplementation] public interface INotifyAppliedDamage { void AppliedDamage(Actor self, Actor damaged, AttackInfo e); } [RequireExplicitImplementation]