Skip to content

Commit

Permalink
Agrega opcion para no mostrar las MOs en el menu del equipo en el de …
Browse files Browse the repository at this point in the history
…objetos registrados
  • Loading branch information
dpertierra committed Jan 2, 2025
1 parent be1c513 commit 36bffba
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 19 deletions.
7 changes: 7 additions & 0 deletions LA BASE DE SKY/Data/Scripts/001_Settings/002_Settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,13 @@ def self.pokedex_names
# si el jugador puede usar Vuelo de forma normal.
CAN_FLY_FROM_TOWN_MAP = true

# Desactivar si no quieres mostrar las MOs en el menú del equipo.
SHOW_HMS_IN_PARTY_MENU = false


# Desactivar si no quieres mostrar las MOs en el menú de la D (Objetos registrados).
SHOW_HMS_IN_SPECIAL_MENU = false

#=============================================================================

# Par de IDs de mapas, en los que el mensaje con el nombre de la zona no se
Expand Down
14 changes: 8 additions & 6 deletions LA BASE DE SKY/Data/Scripts/048_UI/006_UI_Party.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1238,12 +1238,14 @@ def pbPokemonScreen
# Add field move commands
if !pkmn.egg?
insert_index = ($DEBUG) ? 2 : 1
pkmn.moves.each_with_index do |move, i|
next if !HiddenMoveHandlers.hasHandler(move.id) &&
![:MILKDRINK, :SOFTBOILED].include?(move.id)
command_list.insert(insert_index, [move.name, 1])
commands.insert(insert_index, i)
insert_index += 1
if Settings::SHOW_HMS_IN_PARTY_MENU
pkmn.moves.each_with_index do |move, i|
next if !HiddenMoveHandlers.hasHandler(move.id) &&
![:MILKDRINK, :SOFTBOILED].include?(move.id)
command_list.insert(insert_index, [move.name, 1])
commands.insert(insert_index, i)
insert_index += 1
end
end
end
# Choose a menu option
Expand Down
16 changes: 9 additions & 7 deletions LA BASE DE SKY/Data/Scripts/048_UI/017_UI_ReadyMenu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,16 @@ def pbStartReadyMenu(moves, items)
# Using a registered item
#===============================================================================
def pbUseKeyItem
moves = [:CUT, :DEFOG, :DIG, :DIVE, :FLASH, :FLY, :HEADBUTT, :ROCKCLIMB,
:ROCKSMASH, :SECRETPOWER, :STRENGTH, :SURF, :SWEETSCENT, :TELEPORT,
:WATERFALL, :WHIRLPOOL]
real_moves = []
moves.each do |move|
$player.party.each_with_index do |pkmn, i|
next if pkmn.egg? || !pkmn.hasMove?(move)
real_moves.push([move, i]) if pbCanUseHiddenMove?(pkmn, move, false)
if Settings::SHOW_HMS_IN_SPECIAL_MENU
moves = [:CUT, :DEFOG, :DIG, :DIVE, :FLASH, :FLY, :HEADBUTT, :ROCKCLIMB,
:ROCKSMASH, :SECRETPOWER, :STRENGTH, :SURF, :SWEETSCENT, :TELEPORT,
:WATERFALL, :WHIRLPOOL]
moves.each do |move|
$player.party.each_with_index do |pkmn, i|
next if pkmn.egg? || !pkmn.hasMove?(move)
real_moves.push([move, i]) if pbCanUseHiddenMove?(pkmn, move, false)
end
end
end
real_items = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,14 @@ def pbPokemonScreen
command_list.push(_INTL("Cancelar"))
if !pkmn.egg? && show_field_moves
insert_index = ($DEBUG) ? 2 : 1
pkmn.moves.each_with_index do |move, i|
next if !HiddenMoveHandlers.hasHandler(move.id) &&
![:MILKDRINK, :SOFTBOILED].include?(move.id)
command_list.insert(insert_index, [move.name, :Blue])
commands.insert(insert_index, i)
insert_index += 1
if Settings::SHOW_HMS_IN_PARTY_MENU
pkmn.moves.each_with_index do |move, i|
next if !HiddenMoveHandlers.hasHandler(move.id) &&
![:MILKDRINK, :SOFTBOILED].include?(move.id)
command_list.insert(insert_index, [move.name, :Blue])
commands.insert(insert_index, i)
insert_index += 1
end
end
end
choice = @scene.pbShowCommands(_INTL("¿Qué hacer con {1}?", pkmn.name), command_list)
Expand Down

0 comments on commit 36bffba

Please sign in to comment.