mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 06:34:59 +00:00
indexed custom battlers
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user