diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index 320b636121..f03d674aee 100644 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -182,6 +182,7 @@ namespace OpenRA.Traits public interface INotifyOwnerChanged { void OnOwnerChanged(Actor self, Player oldOwner, Player newOwner); } public interface INotifyEffectiveOwnerChanged { void OnEffectiveOwnerChanged(Actor self, Player oldEffectiveOwner, Player newEffectiveOwner); } + [RequireExplicitImplementation] public interface IVoiced { string VoiceSet { get; } diff --git a/OpenRA.Mods.Common/Traits/Voiced.cs b/OpenRA.Mods.Common/Traits/Voiced.cs index 959a15ef76..5fd62f9530 100644 --- a/OpenRA.Mods.Common/Traits/Voiced.cs +++ b/OpenRA.Mods.Common/Traits/Voiced.cs @@ -35,9 +35,9 @@ namespace OpenRA.Mods.Common.Traits Info = info; } - public string VoiceSet { get { return Info.VoiceSet; } } + string IVoiced.VoiceSet { get { return Info.VoiceSet; } } - public bool PlayVoice(Actor self, string phrase, string variant) + bool IVoiced.PlayVoice(Actor self, string phrase, string variant) { if (phrase == null) return false; @@ -50,7 +50,7 @@ namespace OpenRA.Mods.Common.Traits return Game.Sound.PlayPredefined(SoundType.World, self.World.Map.Rules, null, self, type, phrase, variant, true, WPos.Zero, volume, true); } - public bool PlayVoiceLocal(Actor self, string phrase, string variant, float volume) + bool IVoiced.PlayVoiceLocal(Actor self, string phrase, string variant, float volume) { if (phrase == null) return false; @@ -62,7 +62,7 @@ namespace OpenRA.Mods.Common.Traits return Game.Sound.PlayPredefined(SoundType.World, self.World.Map.Rules, null, self, type, phrase, variant, false, self.CenterPosition, volume, true); } - public bool HasVoice(Actor self, string voice) + bool IVoiced.HasVoice(Actor self, string voice) { if (string.IsNullOrEmpty(Info.VoiceSet)) return false;