Changes
Refactor
local Equipment = require('Module:Equipment')
local EquipmentAsset = require('Module:EquipmentAsset')
local Formatting = require('Module:Formatting')
local Formatting = require('Module:Formatting')
local EquipmentGraphicKai = {}
local EquipmentGraphicKai = EquipmentAsset()
function EquipmentGraphicKai:create_equip(args)
function EquipmentGraphicKai:get_source(equip, args)
return Equipment(args[1])
return args.fairy and (args.fairy == "only" and equip:fairy() or equip:cg_fairy()) or equip:cg()
end
end
function EquipmentGraphicKai:graphic(equip, args, link)
function EquipmentGraphicKai:get(equip, args, link)
if not args then
if not args then
args = equip
args = equip
equip = args.equip
equip = args.equip
link = args.link
end
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}
return Formatting:format_image{self:get_source(equip, args), size = args.size, link = link, caption = args.caption}
end
end
return EquipmentGraphicKai
return EquipmentGraphicKai