indexed custom battlers

This commit is contained in:
infinitefusion
2022-11-29 20:22:16 -05:00
parent 572796d7cc
commit 7cd9760adf
40 changed files with 63 additions and 39 deletions

View File

@@ -22,8 +22,29 @@ def mainFunction
return 1
end
def sortCustomBattlers()
customBattlersFolder = 'Graphics/CustomBattlers'
echo "Sorting CustomBattlers files..."
Dir.foreach(customBattlersFolder) do |filename|
next if filename == '.' or filename == '..'
next if !filename.end_with?(".png")
headNum = filename.split('.')[0]
oldPath = customBattlersFolder + "/" + filename
newPath = customBattlersFolder + "/" + headNum.to_s + "/" +filename
echo "\n"
echo "Sorted " + filename + " into " + newPath
begin
File.rename(oldPath, newPath)
rescue
echo "Could not sort "+ filename
end
end
end
def mainFunctionDebug
begin
sortCustomBattlers()
MessageTypes.loadMessageFile("Data/messages.dat") if safeExists?("Data/messages.dat")
PluginManager.runPlugins
Compiler.main