Differenze tra le versioni di "Modulo:Evobox"

Fixing some bugs of Evobox *** sovrascritto il testo esistente ***
(Fixing bug in Evobox (# and MW interaction) *** sovrascritto il testo esistente ***)
(Fixing some bugs of Evobox *** sovrascritto il testo esistente ***)
local spr = require('Modulo:Spr')
local c = mw.loadData('Modulo:Colore/data')
local altforms = mw.loadData('Modulo:AltForms/data')
local useless = mw.loadData('Modulo:UselessForms/data')
local pokes = mw.loadData('Modulo:Poké/data')
local moves = mw.loadData('Modulo:Move/data')
local evodata = mw.loadData('Modulo:Evo/data')
form.loadUseless(true)
local bothforms = form.allFormsData()
 
-- ============================= General functions =============================
 
Returns the box of a single Pokémon form given its ndex with abbr. Notes may be
added using the second parameter. The shown name can also be specified with the
third, defaulting to the data modules value.
 
--]]
eb.BoxForm = function(ndex, notes, shownname)
local name, abbr = form.getnameabbr(ndex)
local altdata = altforms[name] or uselessbothforms[name]
local shownname = shownname or altdata.names[abbr] == "" and string.fu(pokes[name].name)
shownname = shownname == "" and string.fu(pokes[name].name) or shownname
return eb.boxPokemonAuto(ndex, '', notes, shownname)
end
box1 = eb.BoxForm(
p['sprite' .. tostring(index)],
p['loc' .. tostring(index)],
p['name' .. tostring(index)]
),
box2 = eb.BoxForm(
p['sprite' .. tostring(index) .. 'a'],
p['loc' .. tostring(index) .. 'a'],
p['name' .. tostring(index) .. 'a']
),
}))
box1 = eb.BoxForm(
p['sprite' .. tostring(index)],
p['loc' .. tostring(index)],
p['name' .. tostring(index)]
)
}))
only to determine the colors of the background gradient.
- spriteN: the ndex of the N-th form
- nameN: the name of the N-th form (printed instead of the default got
from data modules)
- locN: any additional note for the N-th form
- itemN: the item needed to change from N-th to (N+1)-th form
-- Insert the first phase Pokémon box
table.insert(formboxcontent, string.interp(eb.strings.ROW_ONE, {
box1 = eb.BoxForm(p.sprite1, p.loc1, p.name1)
}))
 
79 548

contributi