Bureaucrats, editor, Interface administrators, Administrators (Semantic MediaWiki), Curators (Semantic MediaWiki), Editors (Semantic MediaWiki), Administrators
47,390
edits
No edit summary Tag: Reverted |
No edit summary Tag: Manual revert |
||
Line 1:
-- <nowiki>
local prices = mw.loadJsonData('Module:GEPrices/data.json')
local _coins = require('Module:Currency')._amount
local p = {}
function p.min(frame)▼
wikitable = 'wikitable',
wikitablereverse = 'wikitablereverse',
table = 'wikitable',
end▼
t = 'wikitable',
rtable = 'wikitablereverse',
rt = 'wikitablereverse',
bracket = 'bracket',
b = 'bracket',
backetreverse = 'backetreverse',
rb = 'backetreverse',
item = 'item',
price = 'price',
none = 'none'
}
local formats = {
wikitable = function(i,v) return string.format('| %s\n| %s', i, v) end,
wikitablereverse = function(i,v) return string.format('| %s\n| %s', v, i) end,
bracket = function(i,v) return string.format('%s (%s)', i, v) end,
backetreverse = function(i,v) return string.format('%s (%s)', v, i) end,
item = function(i,v) return i end,
price = function(i,v) return v end,
none = function(i,v) return '' end
}
function
local
local value = def
for
item = v
end▼
end
end
▲ return low
end
function p.
return findVal(function(pr,v) return v > pr end, math.huge, args)
▲end
return findVal(function(pr,v) return v < pr end, -1, args)
end
function p.
local
local f = fmap[pargs.format]
f = formats[f] or formats.bracket
▲ if v > high then
local r1, r2 = p['_'..c](pargs)
▲ high = v
if pargs.coins == 'y' then
▲ end
r2 = _coins(r2, 'coins')
elseif pargs.coins == 'n' then
r2 = _coins(r2, 'nocoins')
elseif pargs.coins == 'f' then
r2 = mw.getContentLanguage():formatNum(r2)
end▼
if pargs.link == 'plp' then
r1 = string.format('[[File:%s.png|link=%s]]', r1, r1)
elseif pargs.link == 'p' then
r1 = string.format('[[File:%s.png|link=%s]] [[%s]]', r1, r1, r1)
elseif not pargs.link then
end
mw.ext.VariablesLua.vardefine(pargs.var..'_item', r1)
▲end
mw.ext.VariablesLua.vardefine(pargs.var..'_price', r2)
▲ args = frame:getParent().args
▲ local nums = {}
▲ local w = string.gsub(v,',','')
▲ if w then
end
return
end
return p
-- </nowiki>
|