Renamed class PlayerTrainer to class Player, implemented class Player#Pokedex

This commit is contained in:
Maruno17
2021-04-11 20:45:44 +01:00
parent dcd0fe8b21
commit e49ddde198
32 changed files with 637 additions and 475 deletions

View File

@@ -396,12 +396,12 @@ class PokemonSummary_Scene
# Write the Regional/National Dex number
dexnum = GameData::Species.get(@pokemon.species).id_number
dexnumshift = false
if $PokemonGlobal.pokedexUnlocked[$PokemonGlobal.pokedexUnlocked.length-1]
if $Trainer.pokedex.unlocked?(-1) # National Dex is unlocked
dexnumshift = true if Settings::DEXES_WITH_OFFSETS.include?(-1)
else
dexnum = 0
for i in 0...$PokemonGlobal.pokedexUnlocked.length-1
next if !$PokemonGlobal.pokedexUnlocked[i]
for i in 0...$Trainer.pokedex.dexes_count - 1
next if !$Trainer.pokedex.unlocked?(i)
num = pbGetRegionalNumber(i,@pokemon.species)
next if num<=0
dexnum = num
@@ -1180,7 +1180,7 @@ class PokemonSummary_Scene
if !@pokemon.egg?
commands[cmdGiveItem = commands.length] = _INTL("Give item")
commands[cmdTakeItem = commands.length] = _INTL("Take item") if @pokemon.hasItem?
commands[cmdPokedex = commands.length] = _INTL("View Pokédex") if $Trainer.pokedex
commands[cmdPokedex = commands.length] = _INTL("View Pokédex") if $Trainer.has_pokedex
end
commands[cmdMark = commands.length] = _INTL("Mark")
commands[commands.length] = _INTL("Cancel")
@@ -1198,7 +1198,7 @@ class PokemonSummary_Scene
elsif cmdTakeItem>=0 && command==cmdTakeItem
dorefresh = pbTakeItemFromPokemon(@pokemon,self)
elsif cmdPokedex>=0 && command==cmdPokedex
pbUpdateLastSeenForm(@pokemon)
$Trainer.pokedex.register_last_seen(@pokemon)
pbFadeOutIn {
scene = PokemonPokedexInfo_Scene.new
screen = PokemonPokedexInfoScreen.new(scene)