Skip to content

Commit

Permalink
Upload the fixed file on the correct path
Browse files Browse the repository at this point in the history
  • Loading branch information
angelapuzzle authored Dec 27, 2023
1 parent ece51f3 commit 6cbed74
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ TextureWorker worker = new TextureWorker();
List<UndertaleSprite> spritesToDump = new List<UndertaleSprite>();
List<String> splitStringsList = new List<String>();

string inputtedText = "";
inputtedText = SimpleTextInput("Menu", "Enter the name of the sprites", "", true);
string inputtedText = SimpleTextInput("Menu", "Enter the name of the sprites", "", true);
string[] individualLineArray = inputtedText.Split('\n', StringSplitOptions.RemoveEmptyEntries);
foreach (var oneLine in individualLineArray)
{
Expand All @@ -33,7 +32,7 @@ foreach (string listElement in splitStringsList)
{
foreach (UndertaleSprite spr in Data.Sprites)
{
if (listElement.ToLower() == spr.Name.Content.ToLower())
if (listElement.Equals(spr.Name.Content, StringComparison.InvariantCultureIgnoreCase))
{
spritesToDump.Add(spr);
}
Expand All @@ -46,7 +45,7 @@ StartProgressBarUpdater();


await Task.Run(() => {
foreach (UndertaleSprite sprToDump in spritesToDump)
foreach(UndertaleSprite sprToDump in spritesToDump)
{
DumpSprite(sprToDump);
}
Expand All @@ -61,7 +60,7 @@ void DumpSprite(UndertaleSprite sprite)
{
for (int i = 0; i < sprite.Textures.Count; i++)
{
if (sprite.Textures[i]?.Texture != null)
if (sprite.Textures[i]?.Texture is not null)
{
worker.ExportAsPNG(sprite.Textures[i].Texture, Path.Combine(texFolder , sprite.Name.Content + "_" + i + ".png"), null, padded); // Include padding to make sprites look neat!
}
Expand Down

0 comments on commit 6cbed74

Please sign in to comment.