Made more use of nil_or_empty?, fixed incorrect default species body shape, fixed Illusion, fixed potential foreign Pokémon with blank names

This commit is contained in:
Maruno17
2021-05-03 17:34:19 +01:00
parent 8e6ee21c20
commit 474281712b
30 changed files with 71 additions and 73 deletions

View File

@@ -1,4 +1,4 @@
# Using mkxp-z v2.1.1 - https://gitlab.com/mkxp-z/mkxp-z/-/releases/v2.1.1
# Using mkxp-z v2.1.2 - https://gitlab.com/mkxp-z/mkxp-z/-/releases/v2.1.2
$VERBOSE = nil
Font.default_shadow = false if Font.respond_to?(:default_shadow)
Graphics.frame_rate = 40

View File

@@ -181,7 +181,7 @@ module RTP
@rtpPaths = nil
def self.exists?(filename,extensions=[])
return false if !filename || filename==""
return false if nil_or_empty?(filename)
eachPathFor(filename) { |path|
return true if safeExists?(path)
for ext in extensions
@@ -200,7 +200,7 @@ module RTP
end
def self.getPath(filename,extensions=[])
return filename if !filename || filename==""
return filename if nil_or_empty?(filename)
eachPathFor(filename) { |path|
return path if safeExists?(path)
for ext in extensions

View File

@@ -405,7 +405,7 @@ class Messages
if msgs.is_a?(Array)
f.write("[#{secname}]\r\n")
for j in 0...msgs.length
next if msgs[j]==nil || msgs[j]==""
next if nil_or_empty?(msgs[j])
value=Messages.normalizeValue(msgs[j])
origValue=""
if origMessages
@@ -421,7 +421,7 @@ class Messages
f.write("[#{secname}]\r\n")
keys=msgs.keys
for key in keys
next if msgs[key]==nil || msgs[key]==""
next if nil_or_empty?(msgs[key])
value=Messages.normalizeValue(msgs[key])
valkey=Messages.normalizeValue(key)
# key is already serialized

View File

@@ -438,7 +438,7 @@ module PluginManager
message += "#{$!.class} occurred.\r\n"
# go through message content
for line in $!.message.split("\r\n")
next if !line || line == ""
next if nil_or_empty?(line)
n = line[/\d+/]
err = line.split(":")[-1].strip
lms = line.split(":")[0].strip