More tweaks from the Rubocop overlord

This commit is contained in:
Maruno17
2021-12-19 17:28:59 +00:00
parent 33781493f4
commit 65b1a8d6c3
161 changed files with 2839 additions and 2967 deletions

View File

@@ -17,9 +17,10 @@ def pbGetExceptionMessage(e, _script = "")
return e.event_message.dup if e.is_a?(EventScriptError) # Message with map/event ID generated elsewhere
emessage = e.message.dup
emessage.force_encoding(Encoding::UTF_8)
if e.is_a?(Hangup)
case e
when Hangup
emessage = "The script is taking too long. The game will restart."
elsif e.is_a?(Errno::ENOENT)
when Errno::ENOENT
filename = emessage.sub("No such file or directory - ", "")
emessage = "File #{filename} not found."
end