Theater definitions in yaml

This commit is contained in:
Paul Chote
2010-03-04 18:26:43 +13:00
parent 1914a8adbe
commit 724928cf56
10 changed files with 82 additions and 16 deletions

View File

@@ -59,8 +59,7 @@ namespace OpenRA
Game.IssueOrder(Order.Chat("/name " + Game.Settings.PlayerName));
}
public readonly Actor WorldActor;
public readonly Actor WorldActor;
public readonly PathFinder PathFinder;
public readonly Map Map;
@@ -75,9 +74,13 @@ namespace OpenRA
public World()
{
Timer.Time( "----World.ctor" );
Map = new Map( Game.LobbyInfo.GlobalSettings.Map );
Timer.Time( "new Map: {0}" );
TileSet = new TileSet( Map.TileSuffix );
TheaterInfo theaterInfo = Rules.Info["world"].Traits.WithInterface<TheaterInfo>().Where(t => t.Theater == Map.Theater).FirstOrDefault();
TileSet = new TileSet(theaterInfo.Tileset, theaterInfo.Templates, theaterInfo.Suffix);
SpriteSheetBuilder.Initialize( Map );
Timer.Time( "Tileset: {0}" );