Skip to content

Commit

Permalink
Update ExportAllSprites.csx
Browse files Browse the repository at this point in the history
  • Loading branch information
Miepee authored May 7, 2024
1 parent d339bd9 commit f693010
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ EnsureDataLoaded();

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

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

string texFolder = GetFolder(FilePath) + "Export_Sprites" + Path.DirectorySeparatorChar;
TextureWorker worker = new TextureWorker();
Expand Down Expand Up @@ -46,8 +46,8 @@ async Task DumpSprites()
void DumpSprite(UndertaleSprite sprite)
{
string outputFolder = texFolder;
if (useSubDirectoriesPath)
Path.Combine(outputFolder, sprite.Name.Content);
if (useSubDirectories)
outputFolder = Path.Combine(outputFolder, sprite.Name.Content);
if (sprite.Textures.Count > 0)
Directory.CreateDirectory(outputFolder);

Expand All @@ -58,4 +58,4 @@ void DumpSprite(UndertaleSprite sprite)
}

IncrementProgressParallel();
}
}

0 comments on commit f693010

Please sign in to comment.