4,951
edits
(Move certain functions to Module:Common and remove purchase override data in favour of standard implementation in Module:Icons) |
Falterfire (talk | contribs) (Added Ship upgrades & Archaeology tool upgrades) |
||
Line 864: | Line 864: | ||
return p.getToolTable(categoryShort, categoryShort .. '$', modifiers[category], nil) | return p.getToolTable(categoryShort, categoryShort .. '$', modifiers[category], nil) | ||
end | |||
--Adding table for Ship upgrades for Cartography | |||
function p.getShipTable(frame) | |||
local modifiers = { | |||
{ name = 'decreasedSkillIntervalPercent', header = 'Survey Time Decrease', sign = '-', suffix = '%' }, | |||
{ name = 'increasedSightRange', header = 'Increased Sight Range', sign = '+', suffix = '' }, | |||
{ name = 'increasedSurveyRange', header = 'Increased Survey Range', sign = '+', suffix = ''}, | |||
} | |||
return p.getToolTable('Ship', 'Ship', modifiers, 'melvorAoD:Cartography') | |||
end | |||
function p.getArchToolTable(frame)local category = nil | |||
if frame ~= nil then category = frame.args ~= nil and frame.args[1] or frame end | |||
local validCategories = {'Sieve', 'Trowel', 'Brush', 'Shovel'} | |||
if category == nil or not Shared.contains(validCategories, category) then | |||
return Shared.printError('Invalid category specified. Must be one of the following: ' .. mw.text.listToText(validCategories, ', ', ' or ')) | |||
end | |||
local modifiers = { | |||
{name = 'increased'..category..'ToolLevel', header = 'Increased '..category..' Tool level', sign = '+', suffix = ''} | |||
} | |||
return p.getToolTable(category, category .. '$', modifiers, 'melvorAoD:Cartography') | |||
end | end | ||