4,951
edits
Falterfire (talk | contribs) (updated getRodTable) |
Falterfire (talk | contribs) (Updated getPickaxeTable) |
||
Line 48: | Line 48: | ||
function p.getPickaxeTable(frame) | function p.getPickaxeTable(frame) | ||
local result = '{| class="wikitable | local toolArray = {} | ||
for i, upgrade in Shared.skpairs(SkillData.Shop.SkillUpgrades) do | |||
if Shared.contains(upgrade.name, 'Pickaxe') then | |||
table.insert(toolArray, upgrade) | |||
end | |||
end | |||
local result = '{| class="wikitable"' | |||
result = result..'\r\n!colspan="4"| !!colspan="2"|Mine Time Decrease!!colspan="2"|2x Ore Chance' | |||
result = result..'\r\n|- class="headerRow-0"' | result = result..'\r\n|- class="headerRow-0"' | ||
result = result..'\r\n!colspan="2"|Name!!'..Icons.Icon({'Mining', type='skill', notext=true})..' Level' | result = result..'\r\n!colspan="2"|Name!!'..Icons.Icon({'Mining', type='skill', notext=true})..' Level' | ||
result = result..'!! | result = result..'!!Cost!!This Pick!!Total!!This Pick!!Total' | ||
local total = 0 | |||
local total2 = 0 | |||
for i, | for i, tool in Shared.skpairs(toolArray) do | ||
result = result..'\r\n|-' | |||
result = result..'\r\n|data-sort-value="'..tool.name..'"|'..Icons.Icon({tool.name, type='upgrade', size='50', notext=true}) | |||
result = result..'||[['..tool.name..']]' | |||
local level = 1 | |||
if tool.unlockRequirements ~= nil and tool.unlockRequirements.skillLevel ~= nil then | |||
--Gonna be lazy and assume there's only the one skill level and it's the one we care about | |||
level = tool.unlockRequirements.skillLevel[1][2] | |||
end | end | ||
result = result..'||style="text-align:right"|'..level | |||
result = result..'||style="text-align:right" data-sort-value="'..tool.cost.gp..'"|'..Icons.GP(tool.cost.gp) | |||
local cutTime = tool.contains.modifiers.decreasedSkillIntervalPercent[1][2] | |||
total = total + cutTime | |||
result = result..'||style="text-align:right"|-'..cutTime..'%' | |||
result = result..'||style="text-align:right"|-'..total..'%' | |||
local OreDouble = tool.contains.modifiers.increasedChanceToDoubleOres | |||
total2 = total2 + OreDouble | |||
result = result..'||style="text-align:right"|+'..OreDouble..'%' | |||
result = result..'||style="text-align:right"|+'..total2..'%' | |||
end | end | ||