22 lines
883 B
C#
22 lines
883 B
C#
using Microsoft.Xna.Framework.Content.Pipeline;
|
|
using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
|
|
using Microsoft.Xna.Framework.Content.Pipeline.Processors;
|
|
using Newtonsoft.Json;
|
|
using RecrownedAthenaeum.Data;
|
|
using System.IO;
|
|
using System.Text;
|
|
|
|
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
|
|
{
|
|
[ContentProcessor(DisplayName = "Texture Atlas - RecrownedAthenaeum")]
|
|
class TextureAtlasProcessor : ContentProcessor<TextureAtlasData, TextureAtlasData>
|
|
{
|
|
public override TextureAtlasData Process(TextureAtlasData input, ContentProcessorContext context)
|
|
{
|
|
if (context.SourceIdentity.SourceFilename == input.textureName) throw new InvalidContentException("Texture atlas data and texture file for the atlas can't have the same name.");
|
|
context.AddDependency(input.textureName);
|
|
return input;
|
|
}
|
|
}
|
|
}
|