16 403
contributi
(Refactoring of getlink *** sovrascritto il testo esistente ***) |
(Added utility function) |
||
local f = {}
local tab = require('Modulo:Wikilib/tables') -- luacheck: no unused
local genUtil = require('Modulo:Wikilib/gens')
local alt = mw.loadData('Modulo:AltForms/data')
--]]
f.allFormsData = function()
No need for ipairs because integer keys
are used only to index Pokémon by ndex
--]]
--]]
all[k] = table.recursiveMerge(all[k], v)
--]]
all[k].gamesOrder,
v.gamesOrder
))
end
f.allformsdata, f.all_forms_data = f.allFormsData, f.allFormsData
--[[
--]]
f.loadUseless = function(merge)
end
--]]
f.getabbr = function(name, extform)
end
--]]
f.getnameabbr = function(name, extform)
end
--]]
f.getlink = function(poke, black, extform)
end
--]]
f.getNdexForm = function(poke)
end
-- Converte la sigla vuota in 'base'
f.toBase = function(abbr)
end
-- Converte la sigla 'base' nella sigla vuota
f.toEmptyAbbr = function(abbr)
end
--]]
f.hasMega = function(poke)
or table.search(alt.archeo, poke)
end▼
end
end
--]]
f.hasAlola = function(poke)
end
--]]
f.formSpan = function(poke, abbr)
end
f.formspan, f.form_span = f.formSpan, f.formSpan
--[[
Parse an argument that should be a Pokémon name or ndex followed by a form
abbreviation so that it can be used to index a data module.
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.
--]]
f.nameToDataindex = function(name)
local trueName, extform = f.getnameabbr(string.fl(string.trim(name)))
-- If the Pokémon isn't in altForms/data, should return the plain name
-- The return when extform == 'base' settles problems with number and concat
if extform == 'base' or not alt[tonumber(trueName) or trueName] then
return trueName
end
return trueName .. f.toEmptyAbbr(extform)
return f
|