From 6f790938d0b0816eb00e6a8ec50ccacb0e61f0f9 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Wed, 27 Sep 2017 22:01:11 +0200 Subject: [PATCH] Require explicit IGameOver --- OpenRA.Game/Traits/TraitsInterfaces.cs | 1 + OpenRA.Mods.Common/Traits/World/MusicPlaylist.cs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index 1d9a2dccf8..cd2dd81757 100644 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -354,6 +354,7 @@ namespace OpenRA.Traits IEnumerable TargetablePositions(Actor self); } + [RequireExplicitImplementation] public interface IGameOver { void GameOver(World world); } public interface IWarhead diff --git a/OpenRA.Mods.Common/Traits/World/MusicPlaylist.cs b/OpenRA.Mods.Common/Traits/World/MusicPlaylist.cs index 3e9043d68e..855212af0f 100644 --- a/OpenRA.Mods.Common/Traits/World/MusicPlaylist.cs +++ b/OpenRA.Mods.Common/Traits/World/MusicPlaylist.cs @@ -116,7 +116,7 @@ namespace OpenRA.Mods.Common.Traits return playlist; } - public void GameOver(World world) + void IGameOver.GameOver(World world) { if (world.LocalPlayer != null && world.LocalPlayer.WinState == WinState.Won) { @@ -222,7 +222,7 @@ namespace OpenRA.Mods.Common.Traits } } - public void Disposing(Actor self) + void INotifyActorDisposing.Disposing(Actor self) { if (currentSong != null) Game.Sound.StopMusic();