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

@@ -82,21 +82,21 @@ class SpriteWindow_DebugVariables < Window_DrawableCommand
name = $data_system.switches[index+1]
codeswitch = (name[/^s\:/])
val = (codeswitch) ? (eval($~.post_match) rescue nil) : $game_switches[index+1]
if val==nil
if val.nil?
status = "[-]"
colors = 0
codeswitch = true
elsif val
elsif val # true
status = "[ON]"
colors = 2
else
else # false
status = "[OFF]"
colors = 1
end
else
name = $data_system.variables[index+1]
status = $game_variables[index+1].to_s
status = "\"__\"" if !status || status==""
status = "\"__\"" if nil_or_empty?(status)
end
name = '' if name==nil
id_text = sprintf("%04d:",index+1)