Differenze tra le versioni di "Modulo:Wikilib/forms"

Adding parameters to Movelist-entry to handle special cases *** sovrascritto il testo esistente ***
m (Bugfix)
(Adding parameters to Movelist-entry to handle special cases *** sovrascritto il testo esistente ***)
if merge then
alt = f.allFormsData()
allFormsLoaded = true
else
alt = mw.loadData('Modulo:UselessForms/data')
If name is a Pokémon name (not an ndex) it should be lowercase but the first
letter, that can be both upper or lower case.
Doesn't work when name ends with 'base'.
 
--]]
f.nameToDataindex = function(name)
local trueName, extform = f.getnameabbr(string.fl(string.trim(name)))
-- The local variable is needed because global alt can be changed with
-- loadUseless
local trueAlt = mw.loadData('Modulo:AltForms/data')
-- If the Pokémon isn't in altForms/data, should return the plain name
-- The return when extform == 'base' settles problems with numbernumbers and string concat
-- The last check is for Pokémon with both forms
if extform == 'base' or not alt[tonumber(trueName) or trueName] then
if extform == 'base'
if extform == 'base' or not alttrueAlt[tonumber(trueName) or trueName] then
or not trueAlt[tonumber(trueName) or trueName].names[extform] then
return trueName
end
79 548

contributi