mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44:59 +00:00
The Pokédex entry of a newly obtained species now only shows if that species is in an unlocked Dex list
This commit is contained in:
@@ -86,7 +86,7 @@ module Battle::CatchAndStoreMixin
|
|||||||
# Record the Pokémon's species as owned in the Pokédex
|
# Record the Pokémon's species as owned in the Pokédex
|
||||||
if !pbPlayer.owned?(pkmn.species)
|
if !pbPlayer.owned?(pkmn.species)
|
||||||
pbPlayer.pokedex.set_owned(pkmn.species)
|
pbPlayer.pokedex.set_owned(pkmn.species)
|
||||||
if $player.has_pokedex
|
if $player.has_pokedex && $player.pokedex.species_in_unlocked_dex?(pkmn.species)
|
||||||
pbDisplayPaused(_INTL("{1}'s data was added to the Pokédex.", pkmn.name))
|
pbDisplayPaused(_INTL("{1}'s data was added to the Pokédex.", pkmn.name))
|
||||||
pbPlayer.pokedex.register_last_seen(pkmn)
|
pbPlayer.pokedex.register_last_seen(pkmn)
|
||||||
@scene.pbShowPokedex(pkmn.species)
|
@scene.pbShowPokedex(pkmn.species)
|
||||||
|
|||||||
@@ -332,6 +332,15 @@ class Player < Trainer
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def species_in_unlocked_dex?(species)
|
||||||
|
return true if @unlocked_dexes.last
|
||||||
|
(@unlocked_dexes.length - 1).times do |i|
|
||||||
|
next if !self.unlocked?(i)
|
||||||
|
return true if pbGetRegionalNumber(i, species) > 0
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|||||||
@@ -108,7 +108,8 @@ class PokemonEggHatch_Scene
|
|||||||
$player.pokedex.set_owned(@pokemon.species)
|
$player.pokedex.set_owned(@pokemon.species)
|
||||||
$player.pokedex.set_seen_egg(@pokemon.species)
|
$player.pokedex.set_seen_egg(@pokemon.species)
|
||||||
# Show Pokédex entry for new species if it hasn't been owned before
|
# Show Pokédex entry for new species if it hasn't been owned before
|
||||||
if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && !was_owned && $player.has_pokedex
|
if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && !was_owned &&
|
||||||
|
$player.has_pokedex && $player.pokedex.species_in_unlocked_dex?(@pokemon.species)
|
||||||
pbMessage(_INTL("{1}'s data was added to the Pokédex.", @pokemon.name)) { update }
|
pbMessage(_INTL("{1}'s data was added to the Pokédex.", @pokemon.name)) { update }
|
||||||
$player.pokedex.register_last_seen(@pokemon)
|
$player.pokedex.register_last_seen(@pokemon)
|
||||||
pbFadeOutIn do
|
pbFadeOutIn do
|
||||||
@@ -227,7 +228,8 @@ def pbHatch(pokemon)
|
|||||||
$player.pokedex.set_owned(pokemon.species)
|
$player.pokedex.set_owned(pokemon.species)
|
||||||
$player.pokedex.set_seen_egg(pokemon.species)
|
$player.pokedex.set_seen_egg(pokemon.species)
|
||||||
# Show Pokédex entry for new species if it hasn't been owned before
|
# Show Pokédex entry for new species if it hasn't been owned before
|
||||||
if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && !was_owned && $player.has_pokedex
|
if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && !was_owned &&
|
||||||
|
$player.has_pokedex && $player.pokedex.species_in_unlocked_dex?(pokemon.species)
|
||||||
pbMessage(_INTL("{1}'s data was added to the Pokédex.", speciesname))
|
pbMessage(_INTL("{1}'s data was added to the Pokédex.", speciesname))
|
||||||
$player.pokedex.register_last_seen(pokemon)
|
$player.pokedex.register_last_seen(pokemon)
|
||||||
pbFadeOutIn do
|
pbFadeOutIn do
|
||||||
|
|||||||
@@ -230,7 +230,8 @@ class PokemonEvolutionScene
|
|||||||
moves_to_learn.push(i[1])
|
moves_to_learn.push(i[1])
|
||||||
end
|
end
|
||||||
# Show Pokédex entry for new species if it hasn't been owned before
|
# Show Pokédex entry for new species if it hasn't been owned before
|
||||||
if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && !was_owned && $player.has_pokedex
|
if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && !was_owned &&
|
||||||
|
$player.has_pokedex && $player.pokedex.species_in_unlocked_dex?(@pokemon.species)
|
||||||
pbMessageDisplay(@sprites["msgwindow"],
|
pbMessageDisplay(@sprites["msgwindow"],
|
||||||
_INTL("{1}'s data was added to the Pokédex.", newspeciesname)) { pbUpdate }
|
_INTL("{1}'s data was added to the Pokédex.", newspeciesname)) { pbUpdate }
|
||||||
$player.pokedex.register_last_seen(@pokemon)
|
$player.pokedex.register_last_seen(@pokemon)
|
||||||
|
|||||||
@@ -191,7 +191,8 @@ class PokemonTrade_Scene
|
|||||||
pbMessageDisplay(@sprites["msgwindow"],
|
pbMessageDisplay(@sprites["msgwindow"],
|
||||||
_INTL("Take good care of {1}.", speciesname2)) { pbUpdate }
|
_INTL("Take good care of {1}.", speciesname2)) { pbUpdate }
|
||||||
# Show Pokédex entry for new species if it hasn't been owned before
|
# Show Pokédex entry for new species if it hasn't been owned before
|
||||||
if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && !was_owned && $player.has_pokedex
|
if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && !was_owned &&
|
||||||
|
$player.has_pokedex && $player.pokedex.species_in_unlocked_dex?(@pokemon2.species)
|
||||||
pbMessageDisplay(@sprites["msgwindow"],
|
pbMessageDisplay(@sprites["msgwindow"],
|
||||||
_INTL("{1}'s data was added to the Pokédex.", speciesname2)) { pbUpdate }
|
_INTL("{1}'s data was added to the Pokédex.", speciesname2)) { pbUpdate }
|
||||||
$player.pokedex.register_last_seen(@pokemon2)
|
$player.pokedex.register_last_seen(@pokemon2)
|
||||||
|
|||||||
@@ -384,7 +384,8 @@ def pbReceiveMysteryGift(id)
|
|||||||
pbMessage("\\me[Pkmn get]" + _INTL("{1} received {2}!", $player.name, gift[2].name))
|
pbMessage("\\me[Pkmn get]" + _INTL("{1} received {2}!", $player.name, gift[2].name))
|
||||||
$player.mystery_gifts[index] = [id]
|
$player.mystery_gifts[index] = [id]
|
||||||
# Show Pokédex entry for new species if it hasn't been owned before
|
# Show Pokédex entry for new species if it hasn't been owned before
|
||||||
if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && !was_owned && $player.has_pokedex
|
if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && !was_owned &&
|
||||||
|
$player.has_pokedex && $player.pokedex.species_in_unlocked_dex?(gift[2].species)
|
||||||
pbMessage(_INTL("{1}'s data was added to the Pokédex.", gift[2].name))
|
pbMessage(_INTL("{1}'s data was added to the Pokédex.", gift[2].name))
|
||||||
$player.pokedex.register_last_seen(gift[2])
|
$player.pokedex.register_last_seen(gift[2])
|
||||||
pbFadeOutIn do
|
pbFadeOutIn do
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ def pbAddPokemon(pkmn, level = 1, see_form = true)
|
|||||||
$player.pokedex.set_owned(pkmn.species)
|
$player.pokedex.set_owned(pkmn.species)
|
||||||
$player.pokedex.register(pkmn) if see_form
|
$player.pokedex.register(pkmn) if see_form
|
||||||
# Show Pokédex entry for new species if it hasn't been owned before
|
# Show Pokédex entry for new species if it hasn't been owned before
|
||||||
if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && see_form && !was_owned && $player.has_pokedex
|
if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && see_form && !was_owned &&
|
||||||
|
$player.has_pokedex && $player.pokedex.species_in_unlocked_dex?(pkmn.species)
|
||||||
pbMessage(_INTL("{1}'s data was added to the Pokédex.", species_name))
|
pbMessage(_INTL("{1}'s data was added to the Pokédex.", species_name))
|
||||||
$player.pokedex.register_last_seen(pkmn)
|
$player.pokedex.register_last_seen(pkmn)
|
||||||
pbFadeOutIn do
|
pbFadeOutIn do
|
||||||
@@ -102,7 +103,8 @@ def pbAddToParty(pkmn, level = 1, see_form = true)
|
|||||||
$player.pokedex.set_owned(pkmn.species)
|
$player.pokedex.set_owned(pkmn.species)
|
||||||
$player.pokedex.register(pkmn) if see_form
|
$player.pokedex.register(pkmn) if see_form
|
||||||
# Show Pokédex entry for new species if it hasn't been owned before
|
# Show Pokédex entry for new species if it hasn't been owned before
|
||||||
if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && see_form && !was_owned && $player.has_pokedex
|
if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && see_form && !was_owned &&
|
||||||
|
$player.has_pokedex && $player.pokedex.species_in_unlocked_dex?(pkmn.species)
|
||||||
pbMessage(_INTL("{1}'s data was added to the Pokédex.", species_name))
|
pbMessage(_INTL("{1}'s data was added to the Pokédex.", species_name))
|
||||||
$player.pokedex.register_last_seen(pkmn)
|
$player.pokedex.register_last_seen(pkmn)
|
||||||
pbFadeOutIn do
|
pbFadeOutIn do
|
||||||
@@ -142,7 +144,8 @@ def pbAddForeignPokemon(pkmn, level = 1, owner_name = nil, nickname = nil, owner
|
|||||||
$player.pokedex.set_owned(pkmn.species)
|
$player.pokedex.set_owned(pkmn.species)
|
||||||
$player.pokedex.register(pkmn) if see_form
|
$player.pokedex.register(pkmn) if see_form
|
||||||
# Show Pokédex entry for new species if it hasn't been owned before
|
# Show Pokédex entry for new species if it hasn't been owned before
|
||||||
if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && see_form && !was_owned && $player.has_pokedex
|
if Settings::SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN && see_form && !was_owned &&
|
||||||
|
$player.has_pokedex && $player.pokedex.species_in_unlocked_dex?(pkmn.species)
|
||||||
pbMessage(_INTL("The Pokémon's data was added to the Pokédex."))
|
pbMessage(_INTL("The Pokémon's data was added to the Pokédex."))
|
||||||
$player.pokedex.register_last_seen(pkmn)
|
$player.pokedex.register_last_seen(pkmn)
|
||||||
pbFadeOutIn do
|
pbFadeOutIn do
|
||||||
|
|||||||
Reference in New Issue
Block a user