Module:Infobox Item: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 125:
-- { tag = 'argd', content = 'release', colspan = '13' }
-- }
:addRow{
{ tag = 'th', content = 'Examine', colspan = '7' },
{ tag = 'argd', content = 'examine', colspan = '13' }
}
 
if ret:paramDefined('removal', 'all') then
Line 154 ⟶ 158:
:pad(20)
:addRow{
-- { tag = 'th', content = '[[Items#Tradeability|Tradeable]]', colspan = '7' },
{ tag = 'th', content = 'Tradeable', colspan = '7' },
{ tag = 'argd', content = 'tradeable', colspan = '13' }
}
Line 160 ⟶ 165:
if ret:paramDefined('bankable', 'all') then
ret:addRow{
-- { tag = 'th', content = '[[Bank]]able', colspan = '7' },
{ tag = 'th', content = 'Bankable', colspan = '7' },
{ tag = 'argd', content = 'bankable', colspan = '13' }
}
Line 173 ⟶ 179:
 
ret:addRow{
-- { tag = 'th', content = '[[Worn Equipment|Equipable]]', colspan = '7' },
{ tag = 'th', content = 'Equipable', colspan = '7' },
{ tag = 'argd', content = 'equipable', colspan = '13' }
}
:addRow{
-- { tag = 'th', content = '[[Stackable items|Stackable]]', colspan = '7' },
{ tag = 'th', content = 'Stackable', colspan = '7' },
{ tag = 'argd', content = 'stackable', colspan = '13' }
}
Line 184 ⟶ 192:
if ret:paramDefined('noteable', 'all') then
ret:addRow{
-- { tag = 'th', content = '[[Note|Noteable]]', colspan = '7' },
{ tag = 'th', content = 'Noteable', colspan = '7' },
{ tag = 'argd', content = 'noteable', colspan = '13' }
}
Line 191 ⟶ 200:
if ret:paramDefined('edible', 'all') then
ret:addRow{
-- { tag = 'th', content = '[[Food|Edible]]', colspan = '7' },
{ tag = 'th', content = 'Edible', colspan = '7' },
{ tag = 'argd', content = 'edible', colspan = '13' }
}
Line 197 ⟶ 207:
 
ret:addRow{
-- { tag = 'th', content = '[[Choose Option|Options]]', colspan = '7' },
{ tag = 'th', content = 'Options', colspan = '7' },
{ tag = 'argd', content = 'options', colspan = '13' }
}
Line 203 ⟶ 214:
if ret:paramGrep('equipable', true) or ret:paramDefined('wornoptions', 'all') then
ret:addRow{
-- { tag = 'th', content = '[[Worn Equipment|Worn options]]', colspan = '7' },
{ tag = 'th', content = 'Worn options', colspan = '7' },
{ tag = 'argd', content = 'wornoptions', colspan = '13' }
}
Line 210 ⟶ 222:
if ret:paramDefined('destroy', 'all') then
ret:addRow{
-- { tag = 'th', content = '[[Destroy]]', colspan = '7' },
{ tag = 'th', content = 'Destroy', colspan = '7' },
{ tag = 'argd', content = 'destroy', colspan = '13' }
}
Line 225 ⟶ 238:
:pad(20)
:addRow{
-- { tag = 'th', content = '[[Value]]', colspan = '7' },
{ tag = 'th', content = 'Value', colspan = '7' },
{ tag = 'argd', content = 'value', colspan = '13' }
}
Line 232 ⟶ 246:
if ret:paramGrep('alchable', true) then
ret:addRow{
-- { tag = 'th', content = '[[High Level Alchemy|High alch]]', colspan = '7' },
{ tag = 'th', content = 'High alch', colspan = '7' },
{ tag = 'argd', content = 'high', colspan = '13' }
}
:addRow{
-- { tag = 'th', content = '[[Low Level Alchemy|Low alch]]', colspan = '7' },
{ tag = 'th', content = 'Low alch', colspan = '7' },
{ tag = 'argd', content = 'low', colspan = '13' }
}
Line 242 ⟶ 258:
-- otherwise add a single "no alch" row
ret:addRow{
-- { tag = 'th', content = '[[Alchemy]]', colspan = '7' },
{ tag = 'th', content = 'Alchemy', colspan = '7' },
{ tag = 'td', content = 'Not alchemisable', colspan = '13' }
}
Line 248 ⟶ 265:
 
ret:addRow{
-- { tag = 'th', content = '[[Weight]]', colspan = '7' },
{ tag = 'th', content = 'Weight', colspan = '7' },
{ tag = 'argd', content = 'weight', colspan = '13' }
}
Line 254 ⟶ 272:
if ret:paramDefined('respawn', 'all') then
ret:addRow{
-- { tag = 'th', content = '[[Item respawns|Respawn time]]', colspan = '7' },
{ tag = 'th', content = 'Respawn time', colspan = '7' },
{ tag = 'argd', content = 'respawn', colspan = '13' }
}
Line 265 ⟶ 284:
local anydmm = ret:paramGrep('gemw', 'dmm')
if anygemw == true then
local frame = mw.getCurrentFrame()
local citeText = frame:expandTemplate{
title = 'CiteText',
args = {
text = 'Last average price',
quote = 'This price is a weighted average based on actual purchases on the in-game auction, however the wiki\'s prices only get updated from in-game changes every few days.'
}
}
ret:addRow{
-- { tag = 'th', content = 'Grand Exchange', class = 'infobox-subheader', colspan = '20' }
{ tag = 'th', content = 'Auction', class = 'infobox-subheader', colspan = '20' }
}
:pad(20)
:addRow{
-- { tag = 'th', content = '[[RuneScape:Grand Exchange Market Watch|Exchange]]', colspan = '7' },
{ tag = 'th', content = 'Last price ' .. citeText, colspan = '7' },
{ tag = 'argd', content = 'exchange', colspan = '13' }
}
-- :addRow{
-- { tag = 'th', content = '[[Grand Exchange#Buy limits|Buy limit]]', colspan = '7' },
-- { tag = 'argd', content = 'buylimit', colspan = '13' }
-- }
-- :addRow{
-- { tag = 'th', content = '[[Grand Exchange#Volume|Daily volume]]', colspan = '7' },
-- { tag = 'argd', content = 'volume', colspan = '13' }
-- }
-- :pad(20)
-- :addRow{
-- { tag = 'argd', content = 'realtime', class = 'infobox-full-width-content', colspan = '20' }
-- }
-- :pad(20)
-- :addRow{
-- { tag = 'argd', content = 'graph', class = 'infobox-full-width-content', colspan = '20' }
-- }
:pad(20)
elseif anydmm == true then
Line 491 ⟶ 521:
end
 
-- return string.format('<span class="infobox-quantity" data-val-each="%s"><span class="infobox-quantity-replace">%s</span> coin%s ([[Exchange:%s|info]])</span>', gemwprice, commas(gemwprice), gemwprice > 1 and 's' or '', gemwname)
return string.format('<span class="infobox-quantity" data-val-each="%s"><span class="infobox-quantity-replace">%s</span> coin%s</span>', gemwprice, commas(gemwprice), gemwprice > 1 and 's' or '', gemwname)
end