4,951
edits
Falterfire (talk | contribs) (Fixed Firemaking table calls) |
Falterfire (talk | contribs) (Removed redundant references to getSkillID since that's now a Constants function) |
||
Line 14: | Line 14: | ||
local ItemData = mw.loadData('Module:Items/data') | local ItemData = mw.loadData('Module:Items/data') | ||
local SkillData = mw.loadData('Module:Skills/data') | local SkillData = mw.loadData('Module:Skills/data') | ||
local Shared = require('Module:Shared') | local Shared = require('Module:Shared') | ||
local Constants = require('Module:Constants') | |||
local Items = require('Module:Items') | local Items = require('Module:Items') | ||
local ItemSourceTables = require('Module:Items/SourceTables') | local ItemSourceTables = require('Module:Items/SourceTables') | ||
Line 22: | Line 22: | ||
local MasteryCheckpoints = {.1, .25, .5, .95} | local MasteryCheckpoints = {.1, .25, .5, .95} | ||
function p.getMasteryUnlockTable(frame) | function p.getMasteryUnlockTable(frame) | ||
local skillName = frame.args ~= nil and frame.args[1] or frame | local skillName = frame.args ~= nil and frame.args[1] or frame | ||
local skillID = | local skillID = Constants.getSkillID(skillName) | ||
if skillID == nil then | if skillID == nil then | ||
return "ERROR: Failed to find a skill ID for "..skillName | return "ERROR: Failed to find a skill ID for "..skillName | ||
Line 64: | Line 46: | ||
function p.getMasteryCheckpointTable(frame) | function p.getMasteryCheckpointTable(frame) | ||
local skillName = frame.args ~= nil and frame.args[1] or frame | local skillName = frame.args ~= nil and frame.args[1] or frame | ||
local skillID = | local skillID = Constants.getSkillID(skillName) | ||
if skillID == nil then | if skillID == nil then | ||
return "ERROR: Failed to find a skill ID for "..skillName | return "ERROR: Failed to find a skill ID for "..skillName | ||
Line 346: | Line 328: | ||
table.insert(resultPart, '\r\n|-') | table.insert(resultPart, '\r\n|-') | ||
table.insert(resultPart, '\r\n|style="text-align:center"|' .. Icons.Icon({token.name, type='item', size=50, notext=true})) | table.insert(resultPart, '\r\n|style="text-align:center"|' .. Icons.Icon({token.name, type='item', size=50, notext=true})) | ||
table.insert(resultPart, '\r\n|' .. Icons.Icon({ | table.insert(resultPart, '\r\n|' .. Icons.Icon({Constants.getSkillName(m['skillID']), type='skill'})) | ||
table.insert(resultPart, '\r\n|style="text-align:right" data-sort-value="' .. denom .. '"|1/' .. Shared.formatnum(denom)) | table.insert(resultPart, '\r\n|style="text-align:right" data-sort-value="' .. denom .. '"|1/' .. Shared.formatnum(denom)) | ||
table.insert(resultPart, '\r\n|style="text-align:right" data-sort-value="' .. denomCCI .. '"|1/' .. Shared.formatnum(denomCCI)) | table.insert(resultPart, '\r\n|style="text-align:right" data-sort-value="' .. denomCCI .. '"|1/' .. Shared.formatnum(denomCCI)) |