Fixed incorrect message when choosing a Pokémon to withdraw from Day Care

This commit is contained in:
Maruno17
2022-05-20 17:35:02 +01:00
parent f5ee3b9c9f
commit cc7ecf0326

View File

@@ -463,7 +463,7 @@ class DayCare
day_care.reset_egg_counters day_care.reset_egg_counters
end end
def self.choose(text, choice_var) def self.choose(message, choice_var)
day_care = $PokemonGlobal.day_care day_care = $PokemonGlobal.day_care
case day_care.count case day_care.count
when 0 when 0
@@ -474,13 +474,13 @@ class DayCare
commands = [] commands = []
indices = [] indices = []
day_care.slots.each_with_index do |slot, i| day_care.slots.each_with_index do |slot, i|
text = slot.choice_text choice_text = slot.choice_text
next if !text next if !choice_text
commands.push(text) commands.push(choice_text)
indices.push(i) indices.push(i)
end end
commands.push(_INTL("CANCEL")) commands.push(_INTL("CANCEL"))
command = pbMessage(text, commands, commands.length) command = pbMessage(message, commands, commands.length)
$game_variables[choice_var] = (command == commands.length - 1) ? -1 : indices[command] $game_variables[choice_var] = (command == commands.length - 1) ? -1 : indices[command]
end end
end end