mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Added a Setting that makes a new Pokémon's Pokédex entry show after evolution, trading, hatching, gaining from Mystery Gift and general adding
This commit is contained in:
@@ -103,6 +103,22 @@ class PokemonEggHatch_Scene
|
||||
pbMEPlay("Evolution success")
|
||||
@pokemon.name = nil
|
||||
pbMessage(_INTL("\\se[]{1} hatched from the Egg!\\wt[80]", @pokemon.name)) { update }
|
||||
# Record the Pokémon's species as owned in the Pokédex
|
||||
was_owned = $player.owned?(@pokemon.species)
|
||||
$player.pokedex.register(@pokemon)
|
||||
$player.pokedex.set_owned(@pokemon.species)
|
||||
$player.pokedex.set_seen_egg(@pokemon.species)
|
||||
# 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
|
||||
pbMessage(_INTL("{1}'s data was added to the Pokédex.", @pokemon.name)) { update }
|
||||
$player.pokedex.register_last_seen(@pokemon)
|
||||
pbFadeOutIn {
|
||||
scene = PokemonPokedexInfo_Scene.new
|
||||
screen = PokemonPokedexInfoScreen.new(scene)
|
||||
screen.pbDexEntry(@pokemon.species)
|
||||
}
|
||||
end
|
||||
# Nickname the Pokémon
|
||||
if $PokemonSystem.givenicknames == 0 &&
|
||||
pbConfirmMessage(
|
||||
_INTL("Would you like to nickname the newly hatched {1}?", @pokemon.name)
|
||||
@@ -199,15 +215,27 @@ def pbHatch(pokemon)
|
||||
pokemon.timeEggHatched = pbGetTimeNow
|
||||
pokemon.obtain_method = 1 # hatched from egg
|
||||
pokemon.hatched_map = $game_map.map_id
|
||||
$player.pokedex.register(pokemon)
|
||||
$player.pokedex.set_owned(pokemon.species)
|
||||
$player.pokedex.set_seen_egg(pokemon.species)
|
||||
pokemon.record_first_moves
|
||||
if !pbHatchAnimation(pokemon)
|
||||
pbMessage(_INTL("Huh?\1"))
|
||||
pbMessage(_INTL("...\1"))
|
||||
pbMessage(_INTL("... .... .....\1"))
|
||||
pbMessage(_INTL("{1} hatched from the Egg!", speciesname))
|
||||
was_owned = $player.owned?(pokemon.species)
|
||||
$player.pokedex.register(pokemon)
|
||||
$player.pokedex.set_owned(pokemon.species)
|
||||
$player.pokedex.set_seen_egg(pokemon.species)
|
||||
# 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
|
||||
pbMessage(_INTL("{1}'s data was added to the Pokédex.", speciesname))
|
||||
$player.pokedex.register_last_seen(pokemon)
|
||||
pbFadeOutIn {
|
||||
scene = PokemonPokedexInfo_Scene.new
|
||||
screen = PokemonPokedexInfoScreen.new(scene)
|
||||
screen.pbDexEntry(pokemon.species)
|
||||
}
|
||||
end
|
||||
# Nickname the Pokémon
|
||||
if $PokemonSystem.givenicknames == 0 &&
|
||||
pbConfirmMessage(_INTL("Would you like to nickname the newly hatched {1}?", speciesname))
|
||||
nickname = pbEnterPokemonName(_INTL("{1}'s nickname?", speciesname),
|
||||
|
||||
Reference in New Issue
Block a user