mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Rewrote party screen debug code, misc code changes
This commit is contained in:
@@ -159,7 +159,7 @@ module PokemonDebugMixin
|
||||
# Main loop
|
||||
command = 0
|
||||
loop do
|
||||
command = pbShowCommands(_INTL("Do what with {1}?", pkmn.name), commands.list, command)
|
||||
command = show_menu(_INTL("Do what with {1}?", pkmn.name), commands.list, command)
|
||||
if command < 0
|
||||
parent = commands.getParent
|
||||
break if !parent
|
||||
@@ -422,8 +422,41 @@ end
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonDebugPartyScreen
|
||||
class UI::PartyDebugVisuals < UI::BaseVisuals
|
||||
def initialize_background; end
|
||||
def initialize_overlay; end
|
||||
|
||||
def choose_number(help_text, maximum, init_value = 1)
|
||||
old_letter_by_letter = @sprites[:speech_box].letterbyletter
|
||||
@sprites[:speech_box].letterbyletter = false
|
||||
ret = super
|
||||
@sprites[:speech_box].letterbyletter = old_letter_by_letter
|
||||
return ret
|
||||
end
|
||||
end
|
||||
|
||||
class UI::PartyDebug < UI::BaseScreen
|
||||
include PokemonDebugMixin
|
||||
|
||||
def initialize_visuals
|
||||
@visuals = UI::PartyDebugVisuals.new
|
||||
end
|
||||
|
||||
def choose_move(pkmn, message, index = 0)
|
||||
# TODO: The move names can get rather wide, making the message box rather
|
||||
# thin. It's just about acceptable, but maybe the choice window needs
|
||||
# to be displayed above the message box instead of to the right of it.
|
||||
move_names = []
|
||||
pkmn.moves.each do |move|
|
||||
next if !move || !move.id
|
||||
if move.total_pp <= 0
|
||||
move_names.push(_INTL("{1} (PP: ---)", move.name))
|
||||
else
|
||||
move_names.push(_INTL("{1} (PP: {2}/{3})", move.name, move.pp, move.total_pp))
|
||||
end
|
||||
end
|
||||
return show_menu(message, move_names, index)
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
|
||||
Reference in New Issue
Block a user