fetch custom sprites list from github (small fixes)

This commit is contained in:
infinitefusion
2023-04-23 12:30:54 -04:00
parent 521e9a410f
commit e8f8a215b5
2 changed files with 14 additions and 19 deletions

View File

@@ -361,7 +361,6 @@ def Kernel.pbShuffleTrainersCustom(bst_range = 50)
Kernel.pbMessage(_INTL("Parsing custom sprites folder")) Kernel.pbMessage(_INTL("Parsing custom sprites folder"))
customsList = getCustomSpeciesList(true) customsList = getCustomSpeciesList(true)
p customsList
Kernel.pbMessage(_INTL("{1} sprites found", customsList.length.to_s)) Kernel.pbMessage(_INTL("{1} sprites found", customsList.length.to_s))
if customsList.length == 0 if customsList.length == 0
@@ -383,7 +382,6 @@ def Kernel.pbShuffleTrainersCustom(bst_range = 50)
Kernel.pbShuffleTrainers(bst_range, true, customsList) Kernel.pbShuffleTrainers(bst_range, true, customsList)
end end
# trainers=load_data("Data/trainers.dat") # trainers=load_data("Data/trainers.dat")
# i=0 # i=0
# for trainer in trainers # for trainer in trainers
@@ -412,7 +410,6 @@ end
# return (body*NB_POKEMON)+head # return (body*NB_POKEMON)+head
#end #end
def getCustomSpeciesList(allowOnline = false) def getCustomSpeciesList(allowOnline = false)
speciesList = [] speciesList = []
@@ -432,9 +429,8 @@ def getCustomSpeciesList(allowOnline=false)
end end
end end
if speciesList.length <= 200 && allowOnline if speciesList.length <= 200 && allowOnline
Kernel.pbMessage(_INTL("Not enough local sprites found, attempting to fetch list from the internet.")) if Kernel.pbConfirmMessage(_INTL("Not enough local sprites found. Attempt to fetch list from the internet?"))
#try to get list from github #try to get list from github
online_list = list_online_custom_sprites(true) online_list = list_online_custom_sprites(true)
return speciesList if !online_list return speciesList if !online_list
@@ -445,7 +441,7 @@ def getCustomSpeciesList(allowOnline=false)
end end
return species_id_list return species_id_list
end end
end
return speciesList return speciesList
end end
@@ -482,7 +478,6 @@ end
# end # end
# end # end
def Kernel.getBaseStats(species) def Kernel.getBaseStats(species)
if $pkmn_dex[species] == nil if $pkmn_dex[species] == nil
print species print species

Binary file not shown.