Deprecated methods intended to work around filenames with accents, fixed crash when the Compiler wants to rewrite PBS files if they don't exist

This commit is contained in:
Maruno17
2023-05-20 22:10:11 +01:00
parent 276c052822
commit 167155c67d
17 changed files with 130 additions and 158 deletions

View File

@@ -596,10 +596,10 @@ end
def pbImportAllAnimations
animationFolders = []
if safeIsDirectory?("Animations")
if FileTest.directory?("Animations")
Dir.foreach("Animations") do |fb|
f = "Animations/" + fb
animationFolders.push(f) if safeIsDirectory?(f) && fb != "." && fb != ".."
animationFolders.push(f) if FileTest.directory?(f) && fb != "." && fb != ".."
end
end
if animationFolders.length == 0
@@ -639,14 +639,14 @@ def pbImportAllAnimations
textdata.id = -1 # This is not an RPG Maker XP animation
BattleAnimationEditor.pbConvertAnimToNewFormat(textdata)
if textdata.graphic && textdata.graphic != "" &&
!safeExists?(folder + "/" + textdata.graphic) &&
!FileTest.exist?(folder + "/" + textdata.graphic) &&
!FileTest.image_exist?("Graphics/Animations/" + textdata.graphic)
textdata.graphic = ""
missingFiles.push(textdata.graphic)
end
textdata.timing.each do |timing|
next if !timing.name || timing.name == "" ||
safeExists?(folder + "/" + timing.name) ||
FileTest.exist?(folder + "/" + timing.name) ||
FileTest.audio_exist?("Audio/SE/Anim/" + timing.name)
timing.name = ""
missingFiles.push(timing.name)