Require explicit ICreatePlayers
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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<Player>();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user