start cleaning up IWorldLoadHook vs IGameStarted -- IGameStarted dies.
This commit is contained in:
@@ -21,10 +21,11 @@ namespace OpenRA.Traits
|
||||
public readonly int InitialExploreRange = 5;
|
||||
}
|
||||
|
||||
public class MPStartLocations : IGameStarted
|
||||
public class MPStartLocations : IWorldLoaded
|
||||
{
|
||||
public Dictionary<Player, int2> Start = new Dictionary<Player, int2>();
|
||||
public void GameStarted(World world)
|
||||
|
||||
public void WorldLoaded(World world)
|
||||
{
|
||||
var taken = Game.LobbyInfo.Clients.Where(c => c.SpawnPoint != 0)
|
||||
.Select(c => world.Map.SpawnPoints.ElementAt(c.SpawnPoint - 1)).ToList();
|
||||
|
||||
@@ -159,8 +159,7 @@ namespace OpenRA.Traits
|
||||
public interface ITraitPrerequisite<T> where T : ITraitInfo { }
|
||||
|
||||
public interface INotifySelection { void SelectionChanged(); }
|
||||
public interface ILoadWorldHook { void WorldLoaded(World w); }
|
||||
public interface IGameStarted { void GameStarted(World w); }
|
||||
public interface IWorldLoaded { void WorldLoaded(World w); }
|
||||
public interface ICreatePlayers { void CreatePlayers(World w); }
|
||||
|
||||
public interface IBot { void Activate(Player p); }
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace OpenRA.Traits
|
||||
public object Create(ActorInitializer init) { return new BibLayer(init.self, this); }
|
||||
}
|
||||
|
||||
class BibLayer: IRenderOverlay, ILoadWorldHook
|
||||
class BibLayer: IRenderOverlay, IWorldLoaded
|
||||
{
|
||||
World world;
|
||||
BibLayerInfo info;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace OpenRA.Traits
|
||||
{
|
||||
public class ResourceLayerInfo : TraitInfo<ResourceLayer> { }
|
||||
|
||||
public class ResourceLayer: IRenderOverlay, ILoadWorldHook
|
||||
public class ResourceLayer: IRenderOverlay, IWorldLoaded
|
||||
{
|
||||
World world;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace OpenRA.Traits
|
||||
public object Create(ActorInitializer init) { return new SmudgeLayer(this); }
|
||||
}
|
||||
|
||||
public class SmudgeLayer: IRenderOverlay, ILoadWorldHook
|
||||
public class SmudgeLayer: IRenderOverlay, IWorldLoaded
|
||||
{
|
||||
public SmudgeLayerInfo Info;
|
||||
TileReference<byte,byte>[,] tiles;
|
||||
|
||||
Reference in New Issue
Block a user