Module:MoneyMakingGuide: Difference between revisions

m
Fill more of table
(Add table creation (still empty))
m (Fill more of table)
Line 12: Line 12:
local ValueSuffix = 'value'
local ValueSuffix = 'value'
local SkillPrefix = 'skillExp'
local SkillPrefix = 'skillExp'
-- Determines the order of Icons
local DLCParams = {  
local DLCParams = {  
toth  = 'melvorTotH',
aod = 'melvorAoD',  
aod = 'melvorAoD',  
toth  = 'melvorTotH',
ita = 'melvorItA'
ita = 'melvorItA'
}
}
Line 136: Line 138:
         :tag("td")
         :tag("td")
             :attr("colspan", 2)
             :attr("colspan", 2)
             :wikitext("<ActivityName>")
             :wikitext('dlcIcon')
            :wikitext(args['guideName'] or '{{{guideName}}}')
     :tag("tr")
     :tag("tr")
         :tag("th")
         :tag("th")
Line 186: Line 189:
end
end


--- Returns the parsed result of the dlcArgs.
--- Returns the parsed result of the dlcParam.
-- @param dlcArgs (string) A string separated by , listing the DLCs required for the MMG
-- @param dlcParam (string) A string separated by , listing the DLCs required for the MMG
-- @return (table) A table listing which DLCs are required.
-- @return (table) A table containing the items of provided DLCs
function p.parseDLC(dlcArgs)
function p.getDLCIcons(dlcParam)
if type(dlcArgs) ~= 'string' then return {} end
if type(dlcParam) ~= 'string' then return {} end


local dlcs = {}
local dlcs = {}
for _, arg in pairs(shared.splitString(dlcArgs, ',')) do
for _, arg in pairs(shared.splitString(dlcArgs, ',')) do
for dlc, ns in pairs(DLCParams) do
for dlc, icon in pairs(DLCParams) do
if shared.compareString(dlc, arg, true) then
if shared.compareString(dlc, arg, true) then
table.insert(dlcs, ns)
table.insert(dlcs, icon)
end
end
end
end
918

edits