- 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:EquipmentGraphicKai"
Jump to navigation
Jump to search
com>Ckwng (Refactor) |
com>Ckwng (I hope one more comparison isn't too expensive) |
||
Line 5: | Line 5: | ||
function EquipmentGraphicKai:get_source(equip, args) | function EquipmentGraphicKai:get_source(equip, args) | ||
− | return args.fairy and (args.fairy == "only" and equip:fairy() or equip:cg_fairy()) or equip:cg() | + | return args.fairy and (args.fairy == "only" and equip:fairy() or equip:cg_fairy()) or (args.flying and equip:cg_flying() or equip:cg()) |
end | end | ||
Revision as of 06:02, 22 October 2015
Documentation for this module may be created at Module:EquipmentGraphicKai/doc
local EquipmentAsset = require('Module:EquipmentAsset')
local Formatting = require('Module:Formatting')
local EquipmentGraphicKai = EquipmentAsset()
function EquipmentGraphicKai:get_source(equip, args)
return args.fairy and (args.fairy == "only" and equip:fairy() or equip:cg_fairy()) or (args.flying and equip:cg_flying() or equip:cg())
end
function EquipmentGraphicKai:get(equip, args, link)
if not args then
args = equip
equip = args.equip
link = args.link
end
return Formatting:format_image{self:get_source(equip, args), size = args.size, link = link, caption = args.caption}
end
return EquipmentGraphicKai