From 2b391d5724011131d8fa6fca04f4581b3e14e47c Mon Sep 17 00:00:00 2001 From: reaperrr Date: Wed, 27 Sep 2017 21:54:52 +0200 Subject: [PATCH] Require explicit ICreatePlayers --- OpenRA.Game/Traits/TraitsInterfaces.cs | 2 ++ OpenRA.Mods.Common/Traits/World/CreateMPPlayers.cs | 2 +- OpenRA.Mods.Common/Traits/World/EditorActorLayer.cs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index 967caafb8f..1d9a2dccf8 100644 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -307,6 +307,8 @@ namespace OpenRA.Traits public interface INotifySelection { void SelectionChanged(); } public interface IWorldLoaded { void WorldLoaded(World w, WorldRenderer wr); } + + [RequireExplicitImplementation] public interface ICreatePlayers { void CreatePlayers(World w); } public interface IBotInfo : ITraitInfoInterface diff --git a/OpenRA.Mods.Common/Traits/World/CreateMPPlayers.cs b/OpenRA.Mods.Common/Traits/World/CreateMPPlayers.cs index 70d3ba1a74..b5fb0f635e 100644 --- a/OpenRA.Mods.Common/Traits/World/CreateMPPlayers.cs +++ b/OpenRA.Mods.Common/Traits/World/CreateMPPlayers.cs @@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.Traits public class CreateMPPlayers : ICreatePlayers { - public void CreatePlayers(World w) + void ICreatePlayers.CreatePlayers(World w) { var players = new MapPlayers(w.Map.PlayerDefinitions).Players; var worldPlayers = new List(); diff --git a/OpenRA.Mods.Common/Traits/World/EditorActorLayer.cs b/OpenRA.Mods.Common/Traits/World/EditorActorLayer.cs index 6a5f09171c..8dd13a942f 100644 --- a/OpenRA.Mods.Common/Traits/World/EditorActorLayer.cs +++ b/OpenRA.Mods.Common/Traits/World/EditorActorLayer.cs @@ -45,7 +45,7 @@ namespace OpenRA.Mods.Common.Traits this.info = info; } - public void CreatePlayers(World w) + void ICreatePlayers.CreatePlayers(World w) { if (w.Type != WorldType.Editor) return;