Module:Sandbox/User:Alsang/NodeDescriptionChecker: Difference between revisions
Module:Sandbox/User:Alsang/NodeDescriptionChecker (edit)
Revision as of 21:04, 5 December 2024
, 5 December 2024save as WIP for passive stonemason
(tidy up column headings) |
(save as WIP for passive stonemason) |
||
Line 21:
--'[[Uses facility::Knickknacks workbench]] OR [[Variant of::Divination||Sabertooth Cat Skeleton||Wooly Mammoth Skeleton||Triceratops Skeleton||T-Rex Skeleton||Wendigo Skeleton||Bonemeal Cement]]', -- bonewright passive
--'[[Uses facility::One Handed Range (stonemason)||One Handed Melee Workbench (stonemason)||Two Handed Range Workbench (stonemason)||Two Handed Melee Workbench (stonemason)||Shield Vice (stonemason)]]', -- stonemason active
--'[[Uses facility::Goblin Forge||Gnome Forge (skill node)]]', -- blacksmith active
--'[[Uses facility::Jewelry Bench]]', -- blacksmith passive, no non-recipe
'?Uses facility #- = facility',
'?Profession Level A = lvl',
Line 41 ⟶ 39:
-- criterion for if an entry is a recipe, or a passive activity
for _, item in ipairs(results) do
--item.passiveActivity = false -- can delete this entire FOR statement unless there are non-recipe passive activities on the table
end
Line 71 ⟶ 69:
function p.formatResults(results)
-- iterate through products
for _, item in ipairs(results) do
Line 103 ⟶ 99:
-- iterate through materials, adding buy price to running total (individuals not needed)
item.buy = 0
for _, material in ipairs(item.materials) do
Line 119 ⟶ 114:
item.buy = item.buy and item.buy + shopPrice * material.quantity
end
Line 178 ⟶ 160:
item.sell = item.sell and item.outputQuantity and item.sell * item.outputQuantity
item.profit = item.sell and item.buy and item.sell - item.buy
item.profitPerXP = item.profit and item.XP and math.floor(item.profit / item.XP * 100) / 100
-- a lot of downtime in leatherworker
Line 194 ⟶ 172:
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)
end
Line 206 ⟶ 183:
:tag('tr')
:tag('th')
:wikitext('[[File:
:done()
:tag('th')
Line 215 ⟶ 192:
:wikitext('Materials')
:done()
-- :attr{ colspan = '10' }▼
-- :wikitext('Buy Value')▼
:tag('th')
:attr{ colspan = '10' }
:wikitext('
:done()
:tag('th')
:attr{ colspan = '10' }
:wikitext('
:done()
:tag('th')
:done()
:tag('th')
:attr{ colspan = '10' }
:wikitext('Profit/hr
:done()
:tag('th')
Line 244 ⟶ 214:
:wikitext('XP/hr')
:done()
:done()
Line 294 ⟶ 260:
row
:ELSE()
Line 309 ⟶ 275:
:node(currency_cell(item.profitPerHour))
:IF(item.XP)
:tag('td')
Line 331 ⟶ 291:
:END()
:done()
|