mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
fetch custom sprites list from github (small fixes)
This commit is contained in:
@@ -360,8 +360,7 @@ def Kernel.pbShuffleTrainersCustom(bst_range = 50)
|
|||||||
bst_range = pbGet(VAR_RANDOMIZER_TRAINER_BST)
|
bst_range = pbGet(VAR_RANDOMIZER_TRAINER_BST)
|
||||||
|
|
||||||
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,8 +410,7 @@ end
|
|||||||
# return (body*NB_POKEMON)+head
|
# return (body*NB_POKEMON)+head
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
def getCustomSpeciesList(allowOnline = false)
|
||||||
def getCustomSpeciesList(allowOnline=false)
|
|
||||||
speciesList = []
|
speciesList = []
|
||||||
|
|
||||||
for num in 1..NB_POKEMON
|
for num in 1..NB_POKEMON
|
||||||
@@ -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
|
||||||
|
|
||||||
@@ -460,7 +456,7 @@ def getDexNumFromFilename(filename)
|
|||||||
head = splitPoke[0].to_i
|
head = splitPoke[0].to_i
|
||||||
body = splitPoke[1].to_i
|
body = splitPoke[1].to_i
|
||||||
|
|
||||||
return nil if (body * NB_POKEMON) + head > (NB_POKEMON*NB_POKEMON)+420
|
return nil if (body * NB_POKEMON) + head > (NB_POKEMON * NB_POKEMON) + 420
|
||||||
return (body * NB_POKEMON) + head
|
return (body * NB_POKEMON) + head
|
||||||
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.
Reference in New Issue
Block a user