No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
− | function p. |
+ | function p.color(frame) |
local args = get_args(frame, { |
local args = get_args(frame, { |
||
wrappers = { |
wrappers = { |
||
Line 16: | Line 16: | ||
} |
} |
||
}) |
}) |
||
− | return p. |
+ | return p._color(args) |
end |
end |
||
− | function p. |
+ | function p._color(args) |
assert(args[1], i18n.error.no_input) |
assert(args[1], i18n.error.no_input) |
||
Revision as of 17:43, 13 April 2021
▶️
Planeshift.
The documentation for this module can be found at Template:ValueColor/El.
You may be forwarded to another wiki language, in case a translation is not available.
- Color data is stored in Module:ValueColor/data
- Tooltip data is stored in Module:ValueColor/tooltextdata
Lua error in Module:Dependencies at line 14: The module appears to be empty.
local p = {}
local get_args = require('Module:Arguments').getArgs
local data = mw.loadData('Module:ValueColor/data')
local i18n = {
error = {
no_input = 'Input missing',
},
}
function p.color(frame)
local args = get_args(frame, {
wrappers = {
'Template:ValueColor'
}
})
return p._color(args)
end
function p._color(args)
assert(args[1], i18n.error.no_input)
local bonus_name = mw.ustring.lower(args[1])
return data[bonus_name]
end
return p