Module:Infobox Item: Difference between revisions

Jump to navigation Jump to search
400 bytes added ,  10:14, 3 April 2022
no edit summary
No edit summary
No edit summary
Line 335: Line 335:


if ret:paramDefined('tool_type') and string.lower(ret:param('tool_type', 'd')) == "fishing rod" then
if ret:paramDefined('tool_type') and string.lower(ret:param('tool_type', 'd')) == "fishing rod" then
ret:pad(20)
addToolRows(ret, 'Fishing Rod')
:addRow{
end
{ tag = 'th', content = 'Fishing rod', class = 'infobox-subheader', colspan = '20' },
 
}
if ret:paramDefined('tool_type') and string.lower(ret:param('tool_type', 'd')) == "pickaxe" then
:pad(20)
addToolRows(ret, 'Pickaxe')
:addRow{
end
{ tag = 'th', content = 'Type', colspan = '7' },
 
{ tag = 'argd', content = 'tool_type', colspan = '13' },
if ret:paramDefined('tool_type') and string.lower(ret:param('tool_type', 'd')) == "axe" then
}
addToolRows(ret, 'Axe')
:pad(20)
end
:addRow{
{ tag = 'th', content = 'Skill Level', colspan = '7' },
{ tag = 'argd', content = 'skill_level', colspan = '13' },
}


if ret:paramDefined('tool_effect') then
if ret:paramDefined('tool_type') and string.lower(ret:param('tool_type', 'd')) == "shears" then
ret:pad(20)
addToolRows(ret, 'Shears')
:addRow{
{ tag = 'th', content = 'Tool Effect', colspan = '7' },
{ tag = 'argd', content = 'tool_effect', colspan = '13' },
}
end
end
end




Line 378: Line 370:
--[[
--[[
Add rows for necklace stuff
Add rows for necklace stuff
]]
--[[
Add rows for ring stuff
]]
]]


Line 448: Line 436:


return ret:tostring()
return ret:tostring()
end
function addToolRows(ret, title)
ret:pad(20)
:addRow{
{ tag = 'th', content = title, class = 'infobox-subheader', colspan = '20' },
}
:pad(20)
:addRow{
{ tag = 'th', content = 'Type', colspan = '7' },
{ tag = 'argd', content = 'tool_type', colspan = '13' },
}
:pad(20)
:addRow{
{ tag = 'th', content = 'Skill Level', colspan = '7' },
{ tag = 'argd', content = 'skill_level', colspan = '13' },
}
if ret:paramDefined('tool_effect') then
ret:pad(20)
:addRow{
{ tag = 'th', content = 'Tool Effect', colspan = '7' },
{ tag = 'argd', content = 'tool_effect', colspan = '13' },
}
end
end
end



Navigation menu