clean up some old BS in SpriteSheetBuilder
This commit is contained in:
@@ -20,19 +20,20 @@
|
|||||||
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenRA.FileFormats;
|
using OpenRA.FileFormats;
|
||||||
|
using OpenRA.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Graphics
|
namespace OpenRA.Graphics
|
||||||
{
|
{
|
||||||
static class SpriteSheetBuilder
|
static class SpriteSheetBuilder
|
||||||
{
|
{
|
||||||
|
static TheaterInfo GetTheater(Map map)
|
||||||
|
{ // todo: move this somewhere else
|
||||||
|
return Rules.Info["world"].Traits.WithInterface<TheaterInfo>().FirstOrDefault(t => t.Theater == map.Theater);
|
||||||
|
}
|
||||||
|
|
||||||
public static void Initialize( Map map )
|
public static void Initialize( Map map )
|
||||||
{
|
{
|
||||||
exts = new[] {
|
exts = new[] { "." + GetTheater(map).Suffix, ".shp" };
|
||||||
"." + map.Theater.Substring( 0, 3 ).ToLowerInvariant(),
|
|
||||||
".shp",
|
|
||||||
".tem",
|
|
||||||
".sno",
|
|
||||||
".int" };
|
|
||||||
sprites = new Cache<string, Sprite[]>( LoadSprites );
|
sprites = new Cache<string, Sprite[]>( LoadSprites );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user