Differenze tra le versioni di "Modulo:ChooseColor"

Vai alla navigazione Vai alla ricerca
Removing ChooseColor.forPokeTypes (part 3) *** sovrascritto il testo esistente ***
(Moving function for text color on Pokémon gradient from ChooseColor to PokémonData (step 1) *** sovrascritto il testo esistente ***)
(Removing ChooseColor.forPokeTypes (part 3) *** sovrascritto il testo esistente ***)
local str = require('Modulo:Wikilib/strings') -- luacheck: no unused
local w = require('Modulo:Wikilib')
local multigen = require('Modulo:Wikilib/multigen')
local formlib = require('Modulo:Wikilib/forms')
local colorMod = mw.loadData('Modulo:Colore/data')
local colorschemeMod = mw.loadData('Modulo:Colorscheme/data')
local pokes = mw.loadData('Modulo:Poké/data')
 
local function _checkCol(col)
 
return p.forGradBgLua(hex1, hex2)
end
 
-- when colors are types of a Pokémon; accepts both ndex and name
p.forPokeTypes = function(frame)
local args = w.trimAll(frame.args)
local poke = formlib.nameToDataindex(mw.text.decode(args[1]))
local gen = args.gen or ''
 
local type1 = multigen.getGenValue(pokes[poke].type1, gen)
local type2 = multigen.getGenValue(pokes[poke].type2, gen)
 
return p.forModGradBgLua(type1, type2)
end
 
79 547

contributi

Menu di navigazione