Added mp3 support back in, changed layout of townmapgen.html, screenshots now go in Screenshots folder, added "NoName" flag for trainer types

This commit is contained in:
Maruno17
2023-10-14 16:28:37 +01:00
parent d267956c6e
commit 25f85a9a8b
7 changed files with 90 additions and 40 deletions

View File

@@ -611,7 +611,14 @@ end
def pbScreenCapture
t = Time.now
filestart = t.strftime("[%Y-%m-%d] %H_%M_%S.%L")
capturefile = RTP.getSaveFileName(sprintf("%s.png", filestart))
Graphics.screenshot(capturefile)
begin
folder_name = "Screenshots"
Dir.create(folder_name) if !Dir.safe?(folder_name)
capturefile = folder_name + "/" + sprintf("%s.png", filestart)
Graphics.screenshot(capturefile)
rescue
capturefile = RTP.getSaveFileName(sprintf("%s.png", filestart))
Graphics.screenshot(capturefile)
end
pbSEPlay("Pkmn exp full") if FileTest.audio_exist?("Audio/SE/Pkmn exp full")
end