- Welcome to the Kancolle Wiki!
- If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord
Changes
Jump to navigation
Jump to search
Line 2:
Line 2:
− +
+
+
− +
− +
− equip = args.equip +
− +
− +
− 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
− +
Undo revision 460299 by Ckwng (talk)
local Formatting = require('Module:Formatting')
local Formatting = require('Module:Formatting')
local EquipmentCardKai = {}
local EquipmentCardKai = {
_card_size = "260x260px",
}
function EquipmentCardKai:card(equip, args, link)
function EquipmentCardKai:card(equipment, args)
if not args then
if not args then
args = equip
args = equipment
equipment = args.equipment
end
end
return Formatting:format_image{equip:card(), size = args.size, link = link, caption = args.caption}
return Formatting:format_image{equipment:card(), size = args.size or self._card_size, link = args.link, caption = args.caption}
end
end
function EquipmentCardKai:Card(args)
function EquipmentCardKai:Card(args)
local equip = self:create_equip(args)
local equipment = self:create_equipment(args)
return self:card(equipment, args)
end
end
function EquipmentCardKai:create_equip(args)
function EquipmentCardKai:create_equipment(args)
return Equipment(args[1])
return Equipment(args[1])
end
end
return EquipmentCardKai
return EquipmentCardKai