Pixark Wiki
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
local p = {}
 
local p = {}
 
function p.breakdownList( f )
 
function p.breakdownList( f )
  +
local dlclink = require('Module:DLCLink').link
 
local args = f:getParent().args
 
local args = f:getParent().args
 
local resourceList = {}
 
local resourceList = {}
Line 52: Line 53:
 
roundedCnt = '<span style="cursor: help; border-bottom: 2px dotted #397d75;" title="'..bcnt..' to be precise">'..roundedCnt..'</span>'
 
roundedCnt = '<span style="cursor: help; border-bottom: 2px dotted #397d75;" title="'..bcnt..' to be precise">'..roundedCnt..'</span>'
 
end
 
end
table.insert(baseResourcesList,roundedCnt..' × || [[File:'..bres..'.png|30px]] [['..bres..']]')
+
table.insert(baseResourcesList,roundedCnt..' × || [[File:'..bres..'.png|30px]] '..dlclink(bres))
 
end
 
end
 
local collapsibleBaseClassH, collapsibleBaseClassC = '',''
 
local collapsibleBaseClassH, collapsibleBaseClassC = '',''
Line 77: Line 78:
   
 
function p.breakdown(resource,count,indent,collapsible,collapsibleId)
 
function p.breakdown(resource,count,indent,collapsible,collapsibleId)
  +
local dlclink = require('Module:DLCLink').link
 
local breakdowns = mw.loadData( 'Module:ResourceBreakdown/breakdowns' )
 
local breakdowns = mw.loadData( 'Module:ResourceBreakdown/breakdowns' )
 
local baseResources = {}
 
local baseResources = {}
Line 99: Line 101:
 
end
 
end
   
local resourceBreakdown = {'<div style="'..style..'padding-left:5px"'..collapsibleClass..'>'..fontweight..roundedCnt..' × [[File:'..resource..'.png|'..iconsize..'px]] [['..resource..']]'..fontweight}
+
local resourceBreakdown = {'<div style="'..style..'padding-left:5px"'..collapsibleClass..'>'..fontweight..roundedCnt..' × [[File:'..resource..'.png|'..iconsize..'px]] '..dlclink(resource)..fontweight}
 
-- if resource is combined, list components
 
-- if resource is combined, list components
 
if breakdowns[resource] ~= nil then
 
if breakdowns[resource] ~= nil then
Please note that all contributions to the Pixark Wiki are considered to be released under the CC BY-NC-SA
Cancel Editing help (opens in new window)

Template used on this page:

  • Module:ResourceBreakdown/doc (edit)