Skip to content

Commit

Permalink
make flattening an option
Browse files Browse the repository at this point in the history
  • Loading branch information
Miepee committed Apr 29, 2024
1 parent ab52979 commit d339bd9
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ EnsureDataLoaded();

bool padded = (!ScriptQuestion("Export all sprites unpadded?"));

bool useSubDirectories = ScriptQuestion("Export sprites into subdirectories?")

string texFolder = GetFolder(FilePath) + "Export_Sprites" + Path.DirectorySeparatorChar;
TextureWorker worker = new TextureWorker();
if (Directory.Exists(texFolder))
Expand Down Expand Up @@ -43,7 +45,9 @@ async Task DumpSprites()

void DumpSprite(UndertaleSprite sprite)
{
string outputFolder = Path.Combine(texFolder, sprite.Name.Content);
string outputFolder = texFolder;
if (useSubDirectoriesPath)
Path.Combine(outputFolder, sprite.Name.Content);
if (sprite.Textures.Count > 0)
Directory.CreateDirectory(outputFolder);

Expand Down

0 comments on commit d339bd9

Please sign in to comment.