Module:ChefList: Difference between revisions

279 bytes added ,  8 December 2024
hide broken image links in table
(wasnt correctly parsing the names of shops, so wasnt including time spent buying materials on the xp/hr column)
(hide broken image links in table)
Line 128:
-- properties per hour
item.XPPerHour = item.XP and item.productPerHour and math.floor(item.XP * item.productPerHour)
item.profitPerHour = item.profit and item.productPerHour and math.floor(item.profit * item.productPerHour)
-- testing something that will stop broken image links appearing
local imgQuery = mw.smw.ask('[[File:' .. item.name .. '.png]]|?Modification date #- =data|mainlabel=-')
item.imgResult = imgQuery and imgQuery[1] and imgQuery[1].data
end
 
Line 201 ⟶ 205:
:addClass('plinkt-image no-border')
:css{ ['border-left'] = '0', ['padding-left'] = '0' }
:IF(item.imgResult)
:wikitext('[[File:' .. item.name .. '.png|link=' .. item.name .. '|30px]]')
:END()
:done()
:tag('td')
21,691

edits