mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 21:54:58 +00:00
Rewrote Pokémon storage screen code
This commit is contained in:
@@ -149,7 +149,7 @@ end
|
||||
#
|
||||
#===============================================================================
|
||||
module PokemonDebugMixin
|
||||
def pokemon_debug_menu(pkmn, pkmnid, heldpoke = nil, settingUpBattle = false)
|
||||
def pokemon_debug_menu(pkmn, pkmnid, settingUpBattle = false)
|
||||
# Get all commands
|
||||
commands = CommandMenuList.new
|
||||
MenuHandlers.each_available(:pokemon_debug_menu) do |option, hash, name|
|
||||
@@ -170,7 +170,7 @@ module PokemonDebugMixin
|
||||
if commands.hasSubMenu?(cmd)
|
||||
commands.currentList = cmd
|
||||
command = 0
|
||||
elsif MenuHandlers.call(:pokemon_debug_menu, cmd, "effect", pkmn, pkmnid, heldpoke, settingUpBattle, self)
|
||||
elsif MenuHandlers.call(:pokemon_debug_menu, cmd, "effect", pkmn, pkmnid, settingUpBattle, self)
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -178,6 +178,73 @@ module PokemonDebugMixin
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class UI::Party
|
||||
include PokemonDebugMixin
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class UI::PokemonStorage
|
||||
include PokemonDebugMixin
|
||||
|
||||
def choose_move(pkmn, message)
|
||||
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)
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
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
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
@@ -405,60 +472,6 @@ module Battle::DebugMixin
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class UI::Party
|
||||
include PokemonDebugMixin
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonStorageScreen
|
||||
include PokemonDebugMixin
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
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