Differenze tra le versioni di "Modulo:HAentry"

This will break the page, but not too much
m (Ha sprotetto "Modulo:HAentry": Siate responsabili.)
(This will break the page, but not too much)
-- accessoria (non esportata) per i link alle aree
local function splitareas(text,gen)
local regions = {[5] = "Unima", [6] = "Kalos", [7] = "Alola"}
local areas = {}
for w in text:gmatch("[^,]+") do
frame.args.hability, "]]"}
if frame.args.gen5ha then
table.insert(final, table.concat{'<span class="explain tooltips" title="', frame.args.gen5ha, ' nella quinta generazione">*</span>'})
end
if frame.args.noha then
table.insert(final, table.concat{'<span class="explain tooltips" title="Uguale all\'abilità normale">*</span>'})
end
table.insert(final, "\n|")
 
-- QUINTA GENERAZIONE
 
if (tonumber(frame.args.num) or 650) <= 649 then -- salta il campo per gen6
 
local disp5 = {}
 
-- Dream World
 
if frame.args.dwarea then
local dwarea = "[[Dream World]]: "..splitareas(frame.args.dwarea,5)
table.insert(disp5,dwarea)
end
 
-- Meandri nascosti
 
if frame.args.hh then
local hh = "[[Meandri nascosti]]: "..splitareas(frame.args.hh,5)
table.insert(disp5,hh)
end
 
-- scambi di Sciroccopoli
 
if frame.args.nimbasa then
local nimbasa = "[[Sciroccopoli]] ([[Scambio]] con "
table.insert(disp5,nimbasa..")")
end
 
-- RAdar
 
if frame.args.radar then
local radar = "[[RAdar Pokémon]]"
table.insert(disp5,radar)
end
 
-- altri metodi
 
if frame.args.gen5other then
table.insert(disp5,specialtext(frame.args.gen5other))
end
 
-- caso base: non disponibile
 
if #disp5==0 then
disp5="''Non disponibile''"
else disp5 = table.concat(disp5,"<br />")
end
 
table.insert(final, disp5.."\n|")
 
end
 
-- SESTA GENERAZIONE
local disp6 = {}
 
-- Orde
 
if frame.args.horde then
local horde = {"[[Gruppi di Pokémon]]: ",splitareas(frame.args.horde,6)}
table.insert(disp6,table.concat(safari))
end
 
-- altri metodi
 
table.insert(disp6,specialtext(frame.args.gen6other))
end
 
-- caso base: necessita trasferitore (non "non disponibile": se non è nè in quinta nè in sesta non deve apparire nella lista)
 
end
table.insert(final, disp6.."\n")
 
-- SETTIMA GENERAZIONE
-- I don't really know if there may be some standard method, so I'll add
-- just this
local disp7 = {}
 
-- other methods
 
if frame.args.gen7other then
table.insert(disp7, specialtext(frame.args.gen7other))
end
 
-- base case: Banca Pokémon (it's not "Not available" because it wouldn't
-- have appeared in the list if it hadn't been available neither in sixth
-- nor fifth gen)
 
if table.getn(disp7)==0 then
disp7="[[Banca Pokémon]]"
else
disp7 = table.concat(disp7,"<br />")
end
table.insert(final, disp7 .. "\n")
 
return table.concat(final)