Module:WoodcutterList: Difference between revisions

add column for xp if logs are dropped
m (add a "relocate" parameter for working out logs per hour)
(add column for xp if logs are dropped)
Line 49:
item.relocate = 5
item.productPerHour = item.duration and 1 / (item.duration + item.relocate + item.downtime / item.batch) * 3600
item.productPerHourDropping = item.duration and 1 / (item.duration + item.relocate) * 3600
 
-- properties per hour
item.xpPerHour = item.xp and item.productPerHour and math.floor(item.xp * item.productPerHour)
item.xpPerHourDropping = item.xp and item.productPerHourDropping and math.floor(item.xp * item.productPerHourDropping)
item.profitPerHour = item.profit and item.productPerHour and math.floor(item.profit * item.productPerHour)
-- brambles dont need to bank anyway
if item.hideCells then
item.xpPerHour = item.xpPerHourDropping
end
end
 
Line 96 ⟶ 104:
:tag('th')
:wikitext('XP/hr')
:done()
:tag('th')
:wikitext('XP/hr<br>(Dropping logs)')
:done()
:done()
Line 160 ⟶ 171:
:ELSE()
:node(plist.unknown_value_cell(1))
:END()
-- XP per hour
:IF(item.hideCells)
:tag('td')
:addClass('table-na')
:wikitext('N/A')
:done()
:ELSE()
:IF(item.xpPerHourDropping)
:tag('td')
:wikitext(item.xpPerHourDropping and lang:formatNum(tonumber(item.xpPerHourDropping)))
:done()
:ELSE()
:node(plist.unknown_value_cell(1))
:END()
:END()
 
13,097

edits