diff --git a/OpenRA.Mods.Common/Scripting/ScriptTriggers.cs b/OpenRA.Mods.Common/Scripting/ScriptTriggers.cs index 9fbfd872d0..eedaa96d1d 100644 --- a/OpenRA.Mods.Common/Scripting/ScriptTriggers.cs +++ b/OpenRA.Mods.Common/Scripting/ScriptTriggers.cs @@ -127,7 +127,7 @@ namespace OpenRA.Mods.Common.Scripting } } - public void Killed(Actor self, AttackInfo e) + void INotifyKilled.Killed(Actor self, AttackInfo e) { if (world.Disposing) return; diff --git a/OpenRA.Mods.Common/Traits/EjectOnDeath.cs b/OpenRA.Mods.Common/Traits/EjectOnDeath.cs index 5216de1768..01f3c6e286 100644 --- a/OpenRA.Mods.Common/Traits/EjectOnDeath.cs +++ b/OpenRA.Mods.Common/Traits/EjectOnDeath.cs @@ -51,7 +51,7 @@ namespace OpenRA.Mods.Common.Traits this.info = info; } - public void Killed(Actor self, AttackInfo e) + void INotifyKilled.Killed(Actor self, AttackInfo e) { if (self.Owner.WinState == WinState.Lost || !self.World.Map.Contains(self.Location)) return; diff --git a/OpenRA.Mods.Common/Traits/GivesExperience.cs b/OpenRA.Mods.Common/Traits/GivesExperience.cs index b92eeac946..48c055c17c 100644 --- a/OpenRA.Mods.Common/Traits/GivesExperience.cs +++ b/OpenRA.Mods.Common/Traits/GivesExperience.cs @@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Traits this.info = info; } - public void Killed(Actor self, AttackInfo e) + void INotifyKilled.Killed(Actor self, AttackInfo e) { if (e.Attacker == null || e.Attacker.Disposed) return; diff --git a/OpenRA.Mods.Common/Traits/Player/PlayerStatistics.cs b/OpenRA.Mods.Common/Traits/Player/PlayerStatistics.cs index 93d52572fa..99a299f3bf 100644 --- a/OpenRA.Mods.Common/Traits/Player/PlayerStatistics.cs +++ b/OpenRA.Mods.Common/Traits/Player/PlayerStatistics.cs @@ -110,7 +110,7 @@ namespace OpenRA.Mods.Common.Traits public class UpdatesPlayerStatistics : INotifyKilled { - public void Killed(Actor self, AttackInfo e) + void INotifyKilled.Killed(Actor self, AttackInfo e) { if (self.Owner.WinState != WinState.Undefined) return; diff --git a/OpenRA.Mods.Common/Traits/Render/WithDeathAnimation.cs b/OpenRA.Mods.Common/Traits/Render/WithDeathAnimation.cs index 060f0056f8..9495aa15eb 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithDeathAnimation.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithDeathAnimation.cs @@ -62,7 +62,7 @@ namespace OpenRA.Mods.Common.Traits.Render rs = self.Trait(); } - public void Killed(Actor self, AttackInfo e) + void INotifyKilled.Killed(Actor self, AttackInfo e) { // Actors with Crushable trait will spawn CrushedSequence. if (crushed || IsTraitDisabled) diff --git a/OpenRA.Mods.Common/Traits/ShakeOnDeath.cs b/OpenRA.Mods.Common/Traits/ShakeOnDeath.cs index 354e5e5d02..5848198a1b 100644 --- a/OpenRA.Mods.Common/Traits/ShakeOnDeath.cs +++ b/OpenRA.Mods.Common/Traits/ShakeOnDeath.cs @@ -28,7 +28,7 @@ namespace OpenRA.Mods.Common.Traits this.info = info; } - public void Killed(Actor self, AttackInfo e) + void INotifyKilled.Killed(Actor self, AttackInfo e) { self.World.WorldActor.Trait().AddEffect(info.Intensity, self.CenterPosition, 1); } diff --git a/OpenRA.Mods.Common/Traits/Sound/ActorLostNotification.cs b/OpenRA.Mods.Common/Traits/Sound/ActorLostNotification.cs index d6becfb015..9206aefc79 100644 --- a/OpenRA.Mods.Common/Traits/Sound/ActorLostNotification.cs +++ b/OpenRA.Mods.Common/Traits/Sound/ActorLostNotification.cs @@ -29,7 +29,7 @@ namespace OpenRA.Mods.Common.Traits.Sound this.info = info; } - public void Killed(Actor self, AttackInfo e) + void INotifyKilled.Killed(Actor self, AttackInfo e) { var player = info.NotifyAll ? self.World.LocalPlayer : self.Owner; Game.Sound.PlayNotification(self.World.Map.Rules, player, "Speech", info.Notification, self.Owner.Faction.InternalName); diff --git a/OpenRA.Mods.Common/Traits/Sound/DeathSounds.cs b/OpenRA.Mods.Common/Traits/Sound/DeathSounds.cs index cc9d2b81cc..06fc051254 100644 --- a/OpenRA.Mods.Common/Traits/Sound/DeathSounds.cs +++ b/OpenRA.Mods.Common/Traits/Sound/DeathSounds.cs @@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Traits.Sound public DeathSounds(DeathSoundsInfo info) : base(info) { } - public void Killed(Actor self, AttackInfo e) + void INotifyKilled.Killed(Actor self, AttackInfo e) { if (IsTraitDisabled) return; diff --git a/OpenRA.Mods.Common/TraitsInterfaces.cs b/OpenRA.Mods.Common/TraitsInterfaces.cs index d1ca0ef513..91c2376df5 100644 --- a/OpenRA.Mods.Common/TraitsInterfaces.cs +++ b/OpenRA.Mods.Common/TraitsInterfaces.cs @@ -85,6 +85,7 @@ namespace OpenRA.Mods.Common.Traits [RequireExplicitImplementation] public interface INotifyDamage { void Damaged(Actor self, AttackInfo e); } + [RequireExplicitImplementation] public interface INotifyKilled { void Killed(Actor self, AttackInfo e); } public interface INotifyAppliedDamage { void AppliedDamage(Actor self, Actor damaged, AttackInfo e); }