- Welcome to the Kancolle Wiki!
- If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord
Module:EquipmentGraphicKai
Revision as of 21:47, 14 September 2015 by com>Ckwng (Created page with "local Equipment = require('Module:Equipment') local Formatting = require('Module:Formatting') local EquipmentGraphicKai = {} function EquipmentGraphicKai:create_equip(args) ...")
Documentation for this module may be created at Module:EquipmentGraphicKai/doc
local Equipment = require('Module:Equipment')
local Formatting = require('Module:Formatting')
local EquipmentGraphicKai = {}
function EquipmentGraphicKai:create_equip(args)
if args.name then
return Equipment(args.name)
else
return Equipment(args[1])
end
end
function EquipmentGraphicKai:graphic(equip, args, link)
if not args then
args = equip
equip = args.equip
end
return Formatting:format_image{args.fairy and (args.fairy == "only" and equip:fairy() or equip:cg_fairy()) or equip:cg(), size = args.size, link = link, caption = args.caption}
end
function EquipmentGraphicKai:Graphic(args)
local equip = self:create_equip(args)
if args.link then
if args.link == "nil" then
return self:graphic(equip, args, nil)
elseif args.link == "false" then
return self:graphic(equip, args, false)
else
return self:graphic(equip, args, args.link)
end
else
return self:graphic(equip, args, equip:link())
end
end
return EquipmentGraphicKai