Anonymous

Module:Skills/Gathering: Difference between revisions

From Melvor Idle
no edit summary
No edit summary
No edit summary
Line 80: Line 80:
:tag('td'):wikitext(reqText)
:tag('td'):wikitext(reqText)
          :attr('data-sort-value', level)
          :attr('data-sort-value', level)
:tag('td'):wikitext(Icons.getExpansionIcon(tree.id))
:tag('td'):wikitext(Icons.getDLCColumnIcon(tree.id))
  :attr('data-sort-value', Icons.getExpansionID(tree.id))
  :attr('data-sort-value', Icons.getDLCColumnIcon(tree.id))
  :css('text-align', 'center')
  :css('text-align', 'center')
:tag('td'):wikitext(Shared.formatnum(baseXP))
:tag('td'):wikitext(Shared.formatnum(baseXP))
Line 209: Line 209:
table.insert(resultPart, '\n|-\n|class="table-img" data-sort-value="' .. rockName .. '"| '..Icons.Icon({oreData.name, type='rock', notext=true, nolink=true}))
table.insert(resultPart, '\n|-\n|class="table-img" data-sort-value="' .. rockName .. '"| '..Icons.Icon({oreData.name, type='rock', notext=true, nolink=true}))
table.insert(resultPart, '\n| data-sort-value="' ..rockName.. '"|'..Icons.getExpansionIcon(oreData.id) .. rockName)
table.insert(resultPart, '\n| data-sort-value="' ..rockName.. '"|'..Icons.getDLCColumnIcon(oreData.id) .. rockName)
table.insert(resultPart, '\n|class="table-img" data-sort-value="' .. ore.name .. '"| '..Icons.Icon({ore.name, type='item', notext=true}))
table.insert(resultPart, '\n|class="table-img" data-sort-value="' .. ore.name .. '"| '..Icons.Icon({ore.name, type='item', notext=true}))
table.insert(resultPart, '\n| ' .. qtyText .. Icons.Icon({ore.name, type='item', noicon=true}))
table.insert(resultPart, '\n| ' .. qtyText .. Icons.Icon({ore.name, type='item', noicon=true}))
Line 253: Line 253:
table.insert(resultPart, '\n|-\n|class="table-img"| ')
table.insert(resultPart, '\n|-\n|class="table-img"| ')
table.insert(resultPart, Icons.Icon({gemItem.name, type='item', notext=true}))
table.insert(resultPart, Icons.Icon({gemItem.name, type='item', notext=true}))
table.insert(resultPart, '\n| data-sort-value="'..gemItem.name..'"|'..Icons.getExpansionIcon(gemItem.id) .. Icons.Icon({gemItem.name, type='item', noicon=true}))
table.insert(resultPart, '\n| data-sort-value="'..gemItem.name..'"|'..Icons.getDLCColumnIcon(gemItem.id) .. Icons.Icon({gemItem.name, type='item', noicon=true}))
table.insert(resultPart, '\n|style="text-align:right" data-sort-value="' .. gemPct .. '" | ' .. string.format("%.1f%%", gemPct))
table.insert(resultPart, '\n|style="text-align:right" data-sort-value="' .. gemPct .. '" | ' .. string.format("%.1f%%", gemPct))
table.insert(resultPart, '\n|data-sort-value="' .. gemItem.sellsFor .. '"| ' .. Items.getValueText(gemItem))
table.insert(resultPart, '\n|data-sort-value="' .. gemItem.sellsFor .. '"| ' .. Items.getValueText(gemItem))
Line 324: Line 324:
table.insert(resultPart, '\n|-')
table.insert(resultPart, '\n|-')
table.insert(resultPart, '\n|class="table-img"| ' .. Icons.Icon({fish.name, type='item', notext=true}))
table.insert(resultPart, '\n|class="table-img"| ' .. Icons.Icon({fish.name, type='item', notext=true}))
table.insert(resultPart, '\n|data-sort-value="'..fish.name..'"|'..Icons.getExpansionIcon(fish.id) .. Icons.Icon({fish.name, type='item', noicon=true}))
table.insert(resultPart, '\n|data-sort-value="'..fish.name..'"|'..Icons.getDLCColumnIcon(fish.id) .. Icons.Icon({fish.name, type='item', noicon=true}))
table.insert(resultPart, '\n|style="text-align:right" data-sort-value="' .. level .. '"| ' .. reqText)
table.insert(resultPart, '\n|style="text-align:right" data-sort-value="' .. level .. '"| ' .. reqText)
table.insert(resultPart, '\n|style="text-align:right" data-sort-value="' .. timeMin .. '"| ' .. string.format("%.1fs", timeMin))
table.insert(resultPart, '\n|style="text-align:right" data-sort-value="' .. timeMin .. '"| ' .. string.format("%.1fs", timeMin))
Line 362: Line 362:
for i, area in ipairs(fishAreas) do
for i, area in ipairs(fishAreas) do
result = result..'\r\n|-'
result = result..'\r\n|-'
result = result..'\r\n| style ="text-align: left;" |'..Icons.getExpansionIcon(area.id)..area.name
result = result..'\r\n| style ="text-align: left;" |'..Icons.getDLCColumnIcon(area.id)..area.name


local fishArray = {}
local fishArray = {}
Line 412: Line 412:
local odds = drop.chance
local odds = drop.chance
rareTxt = rareTxt..'\r\n|-\r\n|data-sort-value="'..thisItem.name..'"|'..Icons.getExpansionIcon(thisItem.id)..Icons.Icon({thisItem.name, type='item'})
rareTxt = rareTxt..'\r\n|-\r\n|data-sort-value="'..thisItem.name..'"|'..Icons.getDLCColumnIcon(thisItem.id)..Icons.Icon({thisItem.name, type='item'})
rareTxt = rareTxt..'||1||data-sort-value="'..thisItem.sellsFor..'"|'..Items.getValueText(thisItem)
rareTxt = rareTxt..'||1||data-sort-value="'..thisItem.sellsFor..'"|'..Items.getValueText(thisItem)
rareTxt = rareTxt..'||style="text-align:right" data-sort-value="'..odds..'"|'..Shared.fraction(1, Shared.round2(1/(odds/100), 0))
rareTxt = rareTxt..'||style="text-align:right" data-sort-value="'..odds..'"|'..Shared.fraction(1, Shared.round2(1/(odds/100), 0))
Line 612: Line 612:
result = result..'\r\n|-'
result = result..'\r\n|-'
result = result..'\r\n|'..Icons.Icon({npc.name, type='thieving', notext=true})
result = result..'\r\n|'..Icons.Icon({npc.name, type='thieving', notext=true})
result = result..'||data-sort-value="'..npc.name..'"|'..Icons.getExpansionIcon(npc.id)..Icons.Icon({npc.name, type='thieving', noicon=true})
result = result..'||data-sort-value="'..npc.name..'"|'..Icons.getDLCColumnIcon(npc.id)..Icons.Icon({npc.name, type='thieving', noicon=true})


result = result..'||'..area.name
result = result..'||'..area.name
Line 752: Line 752:
:tag('td'):wikitext(level)
:tag('td'):wikitext(level)
          :css('text-align', 'center')
          :css('text-align', 'center')
:tag('td'):wikitext(Icons.getExpansionIcon(seedItem.id))
:tag('td'):wikitext(Icons.getDLCColumnIcon(seedItem.id))
  :css('text-align', 'center')
  :css('text-align', 'center')
  :attr('data-sort-value', Icons.getExpansionID(seedItem.id))
  :attr('data-sort-value', Icons.getDLCColumnIcon(seedItem.id))
:tag('td'):wikitext(Shared.formatnum(baseXP))
:tag('td'):wikitext(Shared.formatnum(baseXP))
:tag('td'):attr('data-sort-value', (baseInt / 1000))
:tag('td'):attr('data-sort-value', (baseInt / 1000))
Line 761: Line 761:
      :wikitext(Items.getValueText(seedItem))
      :wikitext(Items.getValueText(seedItem))
:tag('td'):wikitext(Icons.Icon({productItem.name, type='item', notext=true}))
:tag('td'):wikitext(Icons.Icon({productItem.name, type='item', notext=true}))
:tag('td'):wikitext(Icons.getExpansionIcon(productItem.id) .. Icons.Icon({productItem.name, type='item', noicon=true}))
:tag('td'):wikitext('[[' .. productItem.name .. ']]')


if category.id == 'melvorD:Allotment' then
if category.id == 'melvorD:Allotment' then
Line 816: Line 816:
:tag('td'):wikitext(Icons.Icon({productItem.name, type='item', notext=true}))
:tag('td'):wikitext(Icons.Icon({productItem.name, type='item', notext=true}))
:tag('td'):wikitext('[[' .. productItem.name .. ']]')
:tag('td'):wikitext('[[' .. productItem.name .. ']]')
:tag('td'):wikitext(Icons.getExpansionIcon(seedItem.id))
:tag('td'):wikitext(Icons.getDLCColumnIcon(seedItem.id))
  :css('text-align', 'center')
  :css('text-align', 'center')
  :attr('data-sort-value', Icons.getExpansionID(seedItem.id))
  :attr('data-sort-value', Icons.getDLCColumnIcon(seedItem.id))
:done()
:done()
end
end
Line 866: Line 866:
result = result..'\r\n|-'
result = result..'\r\n|-'
result = result..'\r\n|'..Icons.Icon({product.name, type='item', notext='true'})
result = result..'\r\n|'..Icons.Icon({product.name, type='item', notext='true'})
result = result..'|| ' .. Icons.getExpansionIcon(product.id) .. Icons.Icon({product.name, type='item', noicon=true})
result = result..'|| ' .. Icons.getDLCColumnIcon(product.id) .. Icons.Icon({product.name, type='item', noicon=true})
result = result..'||style="text-align:right;"|'..recipe.level
result = result..'||style="text-align:right;"|'..recipe.level
result = result..'||style="text-align:right" data-sort-value="'..product.healsFor..'"|'..Icons.Icon({"Hitpoints", type="skill", notext=true})..' '..(product.healsFor * 10)
result = result..'||style="text-align:right" data-sort-value="'..product.healsFor..'"|'..Icons.Icon({"Hitpoints", type="skill", notext=true})..' '..(product.healsFor * 10)
Line 1,001: Line 1,001:
table.insert(resultPart, '\n|' .. rowSpan .. ' data-sort-value="' .. name .. '" id="'..name..'"| ')
table.insert(resultPart, '\n|' .. rowSpan .. ' data-sort-value="' .. name .. '" id="'..name..'"| ')
table.insert(resultPart, Icons.Icon({name, type='constellation', notext=true}))
table.insert(resultPart, Icons.Icon({name, type='constellation', notext=true}))
table.insert(resultPart, '\n|' .. rowSpan .. '| ' .. Icons.getExpansionIcon(cons.id) .. name)
table.insert(resultPart, '\n|' .. rowSpan .. '| ' .. Icons.getDLCColumnIcon(cons.id) .. name)
table.insert(resultPart, '\n|' .. rowSpan .. ' style="text-align:right"| ' .. cons.level)
table.insert(resultPart, '\n|' .. rowSpan .. ' style="text-align:right"| ' .. cons.level)
table.insert(resultPart, '\n|' .. rowSpan .. ' style="text-align:right"| ' .. cons.baseExperience)
table.insert(resultPart, '\n|' .. rowSpan .. ' style="text-align:right"| ' .. cons.baseExperience)
2,875

edits