start cleaning up IWorldLoadHook vs IGameStarted -- IGameStarted dies.

This commit is contained in:
Chris Forbes
2010-08-25 21:53:54 +12:00
parent 50066ec238
commit f4da83e920
13 changed files with 23 additions and 26 deletions

View File

@@ -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();

View File

@@ -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); }

View File

@@ -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;

View File

@@ -17,7 +17,7 @@ namespace OpenRA.Traits
{
public class ResourceLayerInfo : TraitInfo<ResourceLayer> { }
public class ResourceLayer: IRenderOverlay, ILoadWorldHook
public class ResourceLayer: IRenderOverlay, IWorldLoaded
{
World world;

View File

@@ -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;