Changes
Refactor
local Equipment = require('Module:Equipment')
local EquipmentAsset = require('Module:EquipmentAsset')
local Formatting = require('Module:Formatting')
local Formatting = require('Module:Formatting')
local EquipmentCardKai = {}
local EquipmentCardKai = EquipmentAsset()
function EquipmentCardKai:card(equip, args, link)
function EquipmentCardKai:get_source(equip)
return equip:card()
end
function EquipmentCardKai:get(equip, args, link)
if not args then
if not args then
args = equip
args = equip
link = args.link
link = args.link
end
end
return Formatting:format_image{equip:card(), size = args.size, link = link, caption = args.caption}
return Formatting:format_image{self:get_source(equip), size = args.size, link = link, caption = args.caption}
end
end
EquipmentCardKai.card = EquipmentCardKai.get
return EquipmentCardKai
return EquipmentCardKai