Module:WoodcutterList: Difference between revisions
correctly parses coop and solo activities separately
m (spacing around images) |
(correctly parses coop and solo activities separately) |
||
Line 70:
if string.find(json,'Log') or string.find(json,'Brambles') then
local itemNew = {}
itemNew.name = item.name
itemNew.Image = item.Image
local activityJSON = mw.text.jsonDecode(json)
itemNew.product = activityJSON.output[1].name
▲ item.XP = activityJSON.xp
▲ item.lvl = activityJSON.level
▲ item.duration = activityJSON.duration and tonumber(activityJSON.duration)
▲ item.product = activityJSON.output[1].name
▲ table.insert(resultsScreened,item)
end
end
Line 221 ⟶ 225:
:addClass('plinkt-link no-border')
:wikitext('[[' .. item.product .. ']]')
:IF(item.coop)
:wikitext(' (Co-op)')
:END()
:done()
|