mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
create missing directories when importing new custom sprites
This commit is contained in:
@@ -75,14 +75,16 @@ def sortCustomBattlers()
|
||||
next if !filename.end_with?(".png")
|
||||
headNum = filename.split('.')[0]
|
||||
oldPath = Settings::CUSTOM_BATTLERS_FOLDER + filename
|
||||
newPath = Settings::CUSTOM_BATTLERS_FOLDER_INDEXED + headNum.to_s + "/" + filename
|
||||
newDir = Settings::CUSTOM_BATTLERS_FOLDER_INDEXED + headNum.to_s
|
||||
newPath = newDir + "/" + filename
|
||||
begin
|
||||
if File.file?(newPath)
|
||||
alreadyExists[oldPath] = newPath
|
||||
echo "\nFile " + newPath + " already exists... Skipping."
|
||||
|
||||
else
|
||||
File.rename(oldPath, newPath)
|
||||
Dir.mkdir(newDir) if !Dir.exist?(newDir)
|
||||
File.rename(oldPath, newPath)
|
||||
$game_temp.nb_imported_sprites+=1
|
||||
echo "\nSorted " + filename + " into " + newPath
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user