mNo edit summary |
mNo edit summary |
||
Line 2: | Line 2: | ||
-- local fooBarData = mw.loadData( 'Module:FooBar/data' ) |
-- local fooBarData = mw.loadData( 'Module:FooBar/data' ) |
||
⚫ | |||
⚫ | |||
⚫ | |||
+ | } |
||
function p.fooBar(frame) |
function p.fooBar(frame) |
||
Line 7: | Line 11: | ||
--local fooBarText = "1.9.0" |
--local fooBarText = "1.9.0" |
||
⚫ | |||
⚫ | |||
⚫ | |||
− | } |
||
return "[[" .. fooBarText .. "|" .. (fooBarData[fooBarText] or "Work In Progress") .. "]]" |
return "[[" .. fooBarText .. "|" .. (fooBarData[fooBarText] or "Work In Progress") .. "]]" |
Revision as of 17:56, 17 November 2019
Description
This module is the Lua back-end for {{UpdateNo}}, to display information about game Updates.
Usage
{{#invoke:UpdateNumber|getVersion|<parameter list>}}
For parameter details see Template:UpdateNo/doc
For direct invocation or from other modules
{{#invoke:UpdateNumber|getLastVer|<count>}}
{{#invoke:UpdateNumber|getVars|<item name>}}
local p = {}
-- local fooBarData = mw.loadData( 'Module:FooBar/data' )
local fooBarData = {
["1.9.0"] = "Version 1.9.0",
["2.0.0"] = "Version 2.0.0",
}
function p.fooBar(frame)
local fooBarText = frame.args[1]
--local fooBarText = "1.9.0"
return "[[" .. fooBarText .. "|" .. (fooBarData[fooBarText] or "Work In Progress") .. "]]"
-- return "[[1.9.0|test]]"
end
return p