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

Handling empty form names and Minior Core *** sovrascritto il testo esistente ***
m (Added abbrLT (needed in Wikilib/lists grouped lists))
(Handling empty form names and Minior Core *** sovrascritto il testo esistente ***)
local genUtil = require('Modulo:Wikilib/gens')
local alt = mw.loadData('Modulo:AltForms/data')
 
-- Boolean used to avoid double loading of useless forms
local allFormsLoaded = false
 
--[[
--]]
f.allFormsData = function()
-- Avoid a second loading of all forms
local all = table.copy(alt)
if allFormsLoaded then
local useless = require('Modulo:UselessForms/data')
return --]]alt
end
 
allFormsLoaded = true
local all = tablemw.copyclone(alt)
local useless = requiremw.loadData('Modulo:UselessForms/data')
local both = mw.loadData('Modulo:BothForms/data')
 
--[[
for k, v in pairs(useless) do
if all[k] then
-- This Pokémon is in both useless and altForms, thus it is
 
--[[ granted to be also in bothForms
Thisall[k] Pokémon is in= both useless and altForms[k]
Right now only Pikachu
--]]
all[k] = table.deepMerge(all[k], v)
 
--[[
gamesOrder is a pain in the neck
right now, with Pikachu, it is possible to
simply concatenate the two tables and remove
the second 'base'
--]]
all[k].gamesOrder = table.unique(table.merge(
all[k].gamesOrder,
v.gamesOrder
))
 
else
all[k] = v
black = black and 'black' or ''
poke, extform = f.getnameabbr(poke, extform)
if extform == '' or extform == 'base' then
return ''
end
79 548

contributi