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)
itemitemNew.XP = activityJSON.xp
itemitemNew.lvl = activityJSON.level
itemitemNew.productcoop = activityJSON.output[1].namecoop
itemitemNew.duration = activityJSON.duration and tonumber(activityJSON.duration)
itemNew.product = activityJSON.output[1].name
table.insert(resultsScreened,itemitemNew)
item.XP = activityJSON.xp
item.lvl = activityJSON.level
item.duration = activityJSON.duration and tonumber(activityJSON.duration)
item.product = activityJSON.output[1].name
item.activityJSON = json
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()
11,281

edits