mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
pokedex
This commit is contained in:
Binary file not shown.
@@ -216,9 +216,7 @@ module Settings
|
||||
# Dex list, no matter which region the player is currently in.
|
||||
def self.pokedex_names
|
||||
return [
|
||||
[_INTL("Kanto Pokédex"), 0],
|
||||
[_INTL("Johto Pokédex"), 1],
|
||||
_INTL("National Pokédex")
|
||||
[_INTL("Kanto Pokédex"), 0]
|
||||
]
|
||||
end
|
||||
# Whether all forms of a given species will be immediately available to view
|
||||
|
||||
@@ -64,7 +64,8 @@ module GameData
|
||||
end
|
||||
|
||||
def self.front_sprite_bitmap(species, form = 0, gender = 0, shiny = false, shadow = false)
|
||||
filename = self.front_sprite_filename(species, form, gender, shiny, shadow)
|
||||
#filename = self.front_sprite_filename(species, form, gender, shiny, shadow)
|
||||
filename = self.front_sprite_filename(GameData::Species.get(species).id_number)
|
||||
return (filename) ? AnimatedBitmap.new(filename) : nil
|
||||
end
|
||||
|
||||
|
||||
@@ -312,29 +312,46 @@ class PokemonPokedex_Scene
|
||||
return true # For MODENUMERICAL
|
||||
end
|
||||
|
||||
def pbGetDexList
|
||||
region = pbGetPokedexRegion
|
||||
regionalSpecies = pbAllRegionalSpecies(region)
|
||||
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 }
|
||||
# def pbGetDexList
|
||||
# region = pbGetPokedexRegion
|
||||
# regionalSpecies = pbAllRegionalSpecies(region)
|
||||
# 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 }
|
||||
# end
|
||||
# shift = Settings::DEXES_WITH_OFFSETS.include?(region)
|
||||
# ret = []
|
||||
# regionalSpecies.each_with_index do |species, i|
|
||||
# next if !species
|
||||
# next if !pbCanAddForModeList?($PokemonGlobal.pokedexMode, species)
|
||||
# species_data = GameData::Species.get(species)
|
||||
# color = species_data.color
|
||||
# type1 = species_data.type1
|
||||
# type2 = species_data.type2 || type1
|
||||
# shape = species_data.shape
|
||||
# height = species_data.height
|
||||
# weight = species_data.weight
|
||||
# ret.push([species, species_data.name, height, weight, i + 1, shift, type1, type2, color, shape])
|
||||
# end
|
||||
# return ret
|
||||
# end
|
||||
|
||||
|
||||
def pbGetDexList()
|
||||
dexlist=[]
|
||||
regionalSpecies=[]
|
||||
for i in 1..PBSpecies.maxValue
|
||||
regionalSpecies.push(i)
|
||||
end
|
||||
shift = Settings::DEXES_WITH_OFFSETS.include?(region)
|
||||
ret = []
|
||||
regionalSpecies.each_with_index do |species, i|
|
||||
next if !species
|
||||
next if !pbCanAddForModeList?($PokemonGlobal.pokedexMode, species)
|
||||
species_data = GameData::Species.get(species)
|
||||
color = species_data.color
|
||||
type1 = species_data.type1
|
||||
type2 = species_data.type2 || type1
|
||||
shape = species_data.shape
|
||||
height = species_data.height
|
||||
weight = species_data.weight
|
||||
ret.push([species, species_data.name, height, weight, i + 1, shift, type1, type2, color, shape])
|
||||
for i in 1...PBSpecies.maxValue
|
||||
nationalSpecies=i
|
||||
if $Trainer.seen?(nationalSpecies)
|
||||
species = GameData::Species.get(nationalSpecies)
|
||||
dexlist.push([species.id_number,species.real_name,0,0,i+1,0])
|
||||
end
|
||||
end
|
||||
return ret
|
||||
return dexlist
|
||||
end
|
||||
|
||||
def pbRefreshDexList(index=0)
|
||||
|
||||
@@ -21,7 +21,10 @@ module GameData
|
||||
return ret
|
||||
end
|
||||
|
||||
def self.front_sprite_bitmap(dex_number)
|
||||
def self.front_sprite_bitmap(dex_number,a=0,b=0,c=0,d=0) #la méthode est utilisé ailleurs avec d'autres arguments (gender, form, etc.) mais on les veut pas
|
||||
if dex_number.is_a?(Symbol)
|
||||
dex_number = GameData::Species.get(dex_number).id_number
|
||||
end
|
||||
filename = self.sprite_filename(dex_number)
|
||||
return (filename) ? AnimatedBitmap.new(filename) : nil
|
||||
end
|
||||
@@ -37,6 +40,7 @@ module GameData
|
||||
end
|
||||
|
||||
def self.sprite_filename(dex_number)
|
||||
return nil if dex_number == nil
|
||||
if dex_number <= Settings::NB_POKEMON
|
||||
folder = dex_number.to_s
|
||||
filename = sprintf("%s.png", dex_number)
|
||||
|
||||
Reference in New Issue
Block a user