Module:Infobox Item: Difference between revisions

Jump to navigation Jump to search
344 bytes added ,  08:42, 1 April 2022
no edit summary
No edit summary
No edit summary
Line 22: Line 22:
{ name = 'members', func = 'has_content' },
{ name = 'members', func = 'has_content' },
{ name = 'level', func = 'number' },
{ name = 'level', func = 'number' },
{ name = 'cost', func = 'has_content' },
{ name = 'cost', func = 'has_content' }, -- Todo: Unbuyable
{ name = 'sell', func = 'has_content' },
{ name = 'sell', func = 'has_content' }, -- Todo: Unsellable


-- Properties
-- Properties
{ name = 'tradable', func = 'has_content' },
{ name = 'tradable', func = 'has_content' },
-- Market values
{ name = 'market_sp_limit', func = 'has_content' }, -- sell price
{ name = 'market_bp_limit', func = 'has_content' }, -- buy price
}
}


Line 102: Line 108:
{ tag = 'argd', content = 'cost', colspan = '13' },
{ tag = 'argd', content = 'cost', colspan = '13' },
}
}
:pad(20)
:addRow{
:addRow{
{ tag = 'th', content = 'Sell Price', colspan = '7' },
{ tag = 'th', content = 'Sell Price', colspan = '7' },
Line 115: Line 122:
}
}


--[[
Add rows for Market stuff
]]
 
local hasMarketSPLimit = ret:paramDefined('market_sp_limit')
local hasMarketBPLimit = ret:paramDefined('market_bp_limit')


if hasMarketSPLimit or hasMarketBPLimit then
ret:pad(20)
:addRow{
{ tag = 'th', content = 'Properties', class = 'infobox-subheader', colspan = '20' },
}


if hasMarketSPLimit then
ret:pad(20)
:addRow{
{ tag = 'th', content = 'Market Sell Price Limit', colspan = '7' },
{ tag = 'argd', content = 'market_sp_limit', colspan = '13' },
}
end


-- ret:addRow{
if hasMarketBPLimit then
-- { tag = 'argh', content = 'name', class='infobox-header', colspan = '20' }
ret:pad(20)
-- }
:addRow{
-- :pad(20)
{ tag = 'th', content = 'Market Buy Price Limit', colspan = '7' },
-- :addRow{
{ tag = 'argd', content = 'market_bp_limit', colspan = '13' },
-- { tag = 'argd', content = 'image', class = 'infobox-image inventory-image infobox-full-width-content', colspan = '20' }
}
-- }
end
-- :pad(20)
end
-- :addRow{
-- { tag = 'th', content = 'Released', colspan = '7' },
-- { tag = 'argd', content = 'release', colspan = '13' }
-- }


-- if ret:paramDefined('removal') then
-- ret:addRow{
-- { tag = 'th', content = 'Removal', colspan = '7' },
-- { tag = 'argd', content = 'removal', colspan = '13' }
-- }
-- end


-- if ret:paramDefined('aka') then
-- if ret:paramDefined('aka') then

Navigation menu