From b662cebfb8e28bca95a83d1bd68e429fff84e048 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Fri, 21 May 2010 12:37:22 +1200 Subject: [PATCH] clean up some old BS in SpriteSheetBuilder --- OpenRA.Game/Graphics/SpriteSheetBuilder.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/OpenRA.Game/Graphics/SpriteSheetBuilder.cs b/OpenRA.Game/Graphics/SpriteSheetBuilder.cs index e6780c5a0e..9aa67809ce 100644 --- a/OpenRA.Game/Graphics/SpriteSheetBuilder.cs +++ b/OpenRA.Game/Graphics/SpriteSheetBuilder.cs @@ -20,19 +20,20 @@ using System.Linq; using OpenRA.FileFormats; +using OpenRA.Traits; namespace OpenRA.Graphics { static class SpriteSheetBuilder { + static TheaterInfo GetTheater(Map map) + { // todo: move this somewhere else + return Rules.Info["world"].Traits.WithInterface().FirstOrDefault(t => t.Theater == map.Theater); + } + public static void Initialize( Map map ) { - exts = new[] { - "." + map.Theater.Substring( 0, 3 ).ToLowerInvariant(), - ".shp", - ".tem", - ".sno", - ".int" }; + exts = new[] { "." + GetTheater(map).Suffix, ".shp" }; sprites = new Cache( LoadSprites ); }