Module:MoneyMakingGuide: Difference between revisions

Fix styling issues with lists
m (Remove bolding of profit margin row)
(Fix styling issues with lists)
 
(3 intermediate revisions by the same user not shown)
Line 162: Line 162:
local pSkill = formatSkillName(args[skillPrefix])
local pSkill = formatSkillName(args[skillPrefix])
local pExp = args[skillPrefix .. AmountSuffix]
local pExp = tonumber(args[skillPrefix .. AmountSuffix])


if paramtest.has_content(pExp) then
pExp = tonumber(pExp)
end
table.insert(skills, {
table.insert(skills, {
prmNumber = i,
prmNumber = i,
Line 174: Line 170:
end
end
-- Return nil if there is no experience earned.
-- Lets the parent table know to enter 'None' instead
if #skills == 0 then
        return nil
    end
return skills
return skills
end
end
Line 310: Line 311:
     :tag("tr")
     :tag("tr")
         :tag("td")
         :tag("td")
        :wikitext(paramtest.default_to(args['skills'], 'None'))  
        :addClass('mmg-no-list')
        :newline()
        :wikitext(paramtest.default_to(args['skills'], 'None'))  
     :tag("td")
     :tag("td")
        :wikitext(paramtest.default_to(args['other'], 'None'))  
            :addClass('mmg-no-list')
        :newline()
        :wikitext(paramtest.default_to(args['other'], 'None'))  
     :tag('tr')
     :tag('tr')
         :tag('th')
         :tag('th')
Line 320: Line 325:
     :tag('tr')
     :tag('tr')
         :tag('td')
         :tag('td')
        :addClass('mmg-no-list')
        :newline()
             :wikitext(paramtest.default_to(args['items'], 'None'))  
             :wikitext(paramtest.default_to(args['items'], 'None'))  
         :tag('td')
         :tag('td')
            :addClass('mmg-no-list')
        :newline()
             :wikitext(paramtest.default_to(args['recommended'], 'None'))  
             :wikitext(paramtest.default_to(args['recommended'], 'None'))  
     :tag("tr")
     :tag("tr")
Line 414: Line 423:
function p.main(frame)
function p.main(frame)
error("Call a specific function rather than main.")
error("Call a specific function rather than main.")
end
function p.test()
local args = {
guideName        ='Mining Pure Crystal',
category        ='Non-combat',
dlc              ='aod, toth',
skills          =[[
*{{SkillReq|Mining|85}}
*{{SkillReq|Herblore|53}}]],
items            =[=[
*{{ItemIcon|Mining Gloves}}
*{{ItemIcon|Perfect Swing Potion IV}}]=],
other            =[=[
*{{ItemIcon|Pure Crystal|notext=true}}{{Icon|Mastery|notext=true}} Level 99
*{{UpgradeIcon|Dragon Pickaxe}}
*[[Mining#Mastery Pool Checkpoints|95% Mining Mastery Pool Checkpoint]]]=],
recommended      =[=[
[[Money_Making/Mining_Pure_Crystal#Improves_GP_Rate|Bonusses that improve profit]]]=],
}
local t = p._buildMMGTable(args)
mw.log(t)
end
end


918

edits