- Welcome to the Kancolle Wiki!
- If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord
Difference between revisions of "Module:EquipmentCardKai"
Jump to navigation
Jump to search
com>Ckwng (Re-apply reverted edit with fix) |
com>Ckwng |
||
Line 8: | Line 8: | ||
args = equip | args = equip | ||
equip = args.equipment or args.equip | equip = args.equipment or args.equip | ||
+ | link = args.link | ||
end | end | ||
return Formatting:format_image{equip:card(), size = args.size, link = link, caption = args.caption} | return Formatting:format_image{equip:card(), size = args.size, link = link, caption = args.caption} |
Revision as of 15:22, 15 September 2015
Documentation for this module may be created at Module:EquipmentCardKai/doc
local Equipment = require('Module:Equipment')
local Formatting = require('Module:Formatting')
local EquipmentCardKai = {}
function EquipmentCardKai:card(equip, args, link)
if not args then
args = equip
equip = args.equipment or args.equip
link = args.link
end
return Formatting:format_image{equip:card(), size = args.size, link = link, caption = args.caption}
end
function EquipmentCardKai:Card(args)
local equip = self:create_equip(args)
if args.link then
if args.link == "nil" then
return self:card(equip, args, nil)
elseif args.link == "false" then
return self:card(equip, args, false)
else
return self:card(equip, args, args.link)
end
else
return self:card(equip, args, equip:link())
end
end
function EquipmentCardKai:create_equip(args)
return Equipment(args[1])
end
return EquipmentCardKai