diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index 1eee307eb2..967caafb8f 100644 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -301,8 +301,11 @@ namespace OpenRA.Traits [SuppressMessage("StyleCop.CSharp.NamingRules", "SA1302:InterfaceNamesMustBeginWithI", Justification = "Not a real interface, but more like a tag.")] public interface UsesInit : ITraitInfo where T : IActorInit { } + [RequireExplicitImplementation] public interface INotifySelected { void Selected(Actor self); } + [RequireExplicitImplementation] public interface INotifySelection { void SelectionChanged(); } + public interface IWorldLoaded { void WorldLoaded(World w, WorldRenderer wr); } public interface ICreatePlayers { void CreatePlayers(World w); } diff --git a/OpenRA.Mods.Common/Traits/ProductionQueueFromSelection.cs b/OpenRA.Mods.Common/Traits/ProductionQueueFromSelection.cs index 61944c5ee8..e2ba0430b1 100644 --- a/OpenRA.Mods.Common/Traits/ProductionQueueFromSelection.cs +++ b/OpenRA.Mods.Common/Traits/ProductionQueueFromSelection.cs @@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.Traits paletteWidget = Exts.Lazy(() => Ui.Root.GetOrNull(info.ProductionPaletteWidget) as ProductionPaletteWidget); } - public void SelectionChanged() + void INotifySelection.SelectionChanged() { // Disable for spectators if (world.LocalPlayer == null)