Module:WoodcutterList: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
m (add a "relocate" parameter for working out logs per hour) |
(add column for xp if logs are dropped) |
||
Line 49: | Line 49: | ||
item.relocate = 5 |
item.relocate = 5 |
||
item.productPerHour = item.duration and 1 / (item.duration + item.relocate + item.downtime / item.batch) * 3600 |
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 |
-- properties per hour |
||
item.xpPerHour = item.xp and item.productPerHour and math.floor(item.xp * item.productPerHour) |
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) |
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 |
end |
||
Line 96: | Line 104: | ||
:tag('th') |
:tag('th') |
||
:wikitext('XP/hr') |
:wikitext('XP/hr') |
||
:done() |
|||
:tag('th') |
|||
:wikitext('XP/hr<br>(Dropping logs)') |
|||
:done() |
:done() |
||
:done() |
:done() |
||
Line 160: | Line 171: | ||
:ELSE() |
:ELSE() |
||
:node(plist.unknown_value_cell(1)) |
: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() |
:END() |
||