mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-03-11 19:02:00 +00:00
Removed all uses of ID numbers for species, some other code changes for abolishing ID numbers
This commit is contained in:
@@ -58,6 +58,8 @@ class HallOfFame_Scene
|
||||
@useMusic=false
|
||||
@battlerIndex=0
|
||||
@hallEntry=[]
|
||||
@nationalDexList = [:NONE]
|
||||
GameData::Species.each_species { |s| @nationalDexList.push(s.species) }
|
||||
end
|
||||
|
||||
def pbStartSceneEntry
|
||||
@@ -305,8 +307,8 @@ class HallOfFame_Scene
|
||||
idno=(pokemon.owner.name.empty? || pokemon.egg?) ? "?????" : sprintf("%05d",pokemon.owner.public_id)
|
||||
dexnumber = _INTL("No. ???")
|
||||
if !pokemon.egg?
|
||||
species_data = GameData::Species.get(pokemon.species)
|
||||
dexnumber = _ISPRINTF("No. {1:03d}",species_data.id_number)
|
||||
number = @nationalDexList.index(pokemon.species) || 0
|
||||
dexnumber = _ISPRINTF("No. {1:03d}", number)
|
||||
end
|
||||
textPositions=[
|
||||
[dexnumber,32,Graphics.height-86,0,BASECOLOR,SHADOWCOLOR],
|
||||
|
||||
@@ -318,7 +318,7 @@ class PokemonPokedex_Scene
|
||||
if !regionalSpecies || regionalSpecies.length == 0
|
||||
# If no Regional Dex defined for the given region, use the National Pokédex
|
||||
regionalSpecies = []
|
||||
GameData::Species.each { |s| regionalSpecies.push(s.id) if s.form == 0 }
|
||||
GameData::Species.each_species { |s| regionalSpecies.push(s.id) }
|
||||
end
|
||||
shift = Settings::DEXES_WITH_OFFSETS.include?(region)
|
||||
ret = []
|
||||
|
||||
@@ -74,10 +74,13 @@ class PokemonPokedexInfo_Scene
|
||||
dexnumshift = false
|
||||
if $Trainer.pokedex.unlocked?(-1) # National Dex is unlocked
|
||||
species_data = GameData::Species.try_get(species)
|
||||
dexnum = species_data.id_number if species_data
|
||||
dexnumshift = true if Settings::DEXES_WITH_OFFSETS.include?(-1)
|
||||
if species_data
|
||||
nationalDexList = [:NONE]
|
||||
GameData::Species.each_species { |s| nationalDexList.push(s.species) }
|
||||
dexnum = nationalDexList.index(species_data.species) || 0
|
||||
dexnumshift = true if dexnum > 0 && Settings::DEXES_WITH_OFFSETS.include?(-1)
|
||||
end
|
||||
else
|
||||
dexnum = 0
|
||||
for i in 0...$Trainer.pokedex.dexes_count - 1 # Regional Dexes
|
||||
next if !$Trainer.pokedex.unlocked?(i)
|
||||
num = pbGetRegionalNumber(i,species)
|
||||
|
||||
@@ -167,6 +167,8 @@ class PokemonSummary_Scene
|
||||
@sprites["messagebox"].visible = false
|
||||
@sprites["messagebox"].letterbyletter = true
|
||||
pbBottomLeftLines(@sprites["messagebox"],2)
|
||||
@nationalDexList = [:NONE]
|
||||
GameData::Species.each_species { |s| @nationalDexList.push(s.species) }
|
||||
drawPage(@page)
|
||||
pbFadeInAndShow(@sprites) { pbUpdate }
|
||||
end
|
||||
@@ -391,12 +393,12 @@ class PokemonSummary_Scene
|
||||
[_INTL("ID No."),238,202,0,base,shadow],
|
||||
]
|
||||
# Write the Regional/National Dex number
|
||||
dexnum = GameData::Species.get(@pokemon.species).id_number
|
||||
dexnum = 0
|
||||
dexnumshift = false
|
||||
if $Trainer.pokedex.unlocked?(-1) # National Dex is unlocked
|
||||
dexnum = @nationalDexList.index(@pokemon.species_data.species) || 0
|
||||
dexnumshift = true if Settings::DEXES_WITH_OFFSETS.include?(-1)
|
||||
else
|
||||
dexnum = 0
|
||||
for i in 0...$Trainer.pokedex.dexes_count - 1
|
||||
next if !$Trainer.pokedex.unlocked?(i)
|
||||
num = pbGetRegionalNumber(i,@pokemon.species)
|
||||
|
||||
Reference in New Issue
Block a user