Skip to content

Commit

Permalink
Revert "Implemented Battle Debug Menu (#130)"
Browse files Browse the repository at this point in the history
This reverts commit 7c48148.
  • Loading branch information
Maruno17 committed Nov 24, 2021
1 parent 7c48148 commit 5337ee1
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 1,449 deletions.
Binary file modified Data/Scripts.rxdata
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ def pbCallMenu(idxBattler)
end

def pbDebugMenu
pbBattleDebug(self)
# NOTE: This doesn't do anything yet. Maybe you can write your own debugging
# options!
end

#=============================================================================
Expand Down
80 changes: 0 additions & 80 deletions Data/Scripts/020_Debug/003_Debug menus/001_Debug_Menus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,82 +169,6 @@ def pbPokemonDebug(pkmn, pkmnid, heldpoke = nil, settingUpBattle = false)
end
end

#===============================================================================
#
#===============================================================================
module BattleDebugMixin
def pbBattleDebug(battle,show_all = true)
registerBattlerCommands(battle)
commands = CommandMenuList.new
BattleDebugMenuCommands.each do |option, hash|
commands.add(option, hash) if show_all || hash["always_show"]
end



viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
viewport.z = 99999
sprites = {}
sprites["textbox"] = pbCreateMessageWindow
sprites["textbox"].letterbyletter = false
sprites["cmdwindow"] = Window_CommandPokemonEx.new(commands.list)
cmdwindow = sprites["cmdwindow"]
cmdwindow.x = Graphics.width - cmdwindow.width
cmdwindow.y = Graphics.height-sprites["textbox"].height - cmdwindow.height
cmdwindow.viewport = viewport
cmdwindow.visible = true
sprites["textbox"].text = commands.getDesc(cmdwindow.index)
pbFadeInAndShow(sprites)
ret = -1
refresh = true
loop do
loop do
oldindex = cmdwindow.index
cmdwindow.update
if refresh || cmdwindow.index != oldindex
sprites["textbox"].text = commands.getDesc(cmdwindow.index)
refresh = false
end
Graphics.update
Input.update
if Input.trigger?(Input::BACK)
parent = commands.getParent
if parent
pbPlayCancelSE
commands.currentList = parent[0]
cmdwindow.commands = commands.list
cmdwindow.index = parent[1]
refresh = true
else
ret = -1
break
end
elsif Input.trigger?(Input::USE)
ret = cmdwindow.index
break
end
end
break if ret < 0
cmd = commands.getCommand(ret)
if commands.hasSubMenu?(cmd)
pbPlayDecisionSE
commands.currentList = cmd
cmdwindow.commands = commands.list
cmdwindow.index = 0
refresh = true
else
BattleDebugMenuCommands.call("effect", cmd,battle,sprites)
end
end
pbPlayCloseMenuSE
pbFadeOutAndHide(sprites)
pbDisposeMessageWindow(sprites["textbox"])
pbDisposeSpriteHash(sprites)
viewport.dispose
end

end

#===============================================================================
#
#===============================================================================
Expand All @@ -259,7 +183,3 @@ class PokemonStorageScreen
class PokemonDebugPartyScreen
include PokemonDebugMixin
end

class PokeBattle_Battle
include BattleDebugMixin
end
Loading

0 comments on commit 5337ee1

Please sign in to comment.