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

Fixing problem with uppercase letters, adding multigen to Rotom's types *** sovrascritto il testo esistente ***
(Adding parameters to Movelist-entry to handle special cases *** sovrascritto il testo esistente ***)
(Fixing problem with uppercase letters, adding multigen to Rotom's types *** sovrascritto il testo esistente ***)
--[[
 
Parse an argument that should be a Pokémon name or ndex, followedthe bylatter a formpossibly
abbreviationfollowed by a form abbr, so that it can be used to index a data module.
If name is a Pokémon name (not an ndex) it shouldcan't be lowercasefollowed butby the firstabbr.
letter, that can be both upper or lower case.
Doesn't work when name ends with 'base'.
 
--]]
f.nameToDataindex = function(name)
local trueName, extformname = f.getnameabbr(string.fltrim(string.trimtostring(name)))
local trueName, extform = f.getnameabbr(name)
-- If the name contains uppercase letters it's not recognized by
-- getnameabbr, so this mess is needed
trueName = type(trueName) == 'number' and trueName or (
trueName == '' and name:lower() or trueName:lower())
-- The local variable is needed because global alt can be changed with
-- loadUseless
79 548

contributi