The Alchemist Code Wiki

READ MORE

The Alchemist Code 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 102: Line 102:
 
end
 
end
   
-- Non cargo version
 
function p._icon2(args)
 
local data = args.data or {}
 
local iname = data.iname
 
if not iname then return end
 
 
data.name = linkUtils.wikiSafeName(data.name)
 
 
local link = nil
 
if args.link ~= 'none' then
 
if args.jplink then
 
link = linkUtils.acdbLink(iname, true)
 
else
 
link = data._pageName or data.name
 
end
 
end
 
 
-- TODO Get the correct server
 
local renderArgs = {
 
(data.icon or '') ~= '' and ('ConceptCardIcon,'..data.icon) or 'ItemIcon,IT_UNKNOWN',
 
data.name,
 
link,
 
tonumber(data.rare),
 
4,
 
64,
 
tonumber(args.count),
 
args.classes,
 
nil,
 
false,
 
}
 
 
local name
 
if args.name ~= 'none' then
 
if (renderArgs[3] or '') ~= '' then
 
if args.jplink then
 
name = ('[%s %s]'):format(renderArgs[3], renderArgs[2])
 
else
 
name = ('[[%s|%s]]'):format(renderArgs[3], renderArgs[2])
 
end
 
else
 
name = renderArgs[2]
 
end
 
end
 
 
if args.size == 'large' then
 
renderArgs[6] = 128
 
elseif args.size == 'small' then
 
renderArgs[6] = 24
 
renderArgs[9] = name and '<span>'..name..'</span>'
 
renderArgs[10] = true
 
elseif args['size'] == 'compact' then
 
renderArgs[9] = name and '<div class="item-count" style="font-size: 0.7em;overflow: hidden;right: 0">'..renderArgs[2]..'</div>'
 
else
 
renderArgs[9] = name and '<div style="width: '..renderArgs[6]..'px">'..name..'</div>'
 
end
 
 
return render_icon(unpack(renderArgs))
 
end
 
   
 
function p._pageName(args)
 
function p._pageName(args)
Please note that all contributions to the The Alchemist Code 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:Render/Memento/doc (edit)