- 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:EquipmentCardKai"
Jump to navigation
Jump to search
m |
|||
Line 4: | Line 4: | ||
local EquipmentCardKai = EquipmentAsset() | local EquipmentCardKai = EquipmentAsset() | ||
− | function EquipmentCardKai:get_source(equip) | + | function EquipmentCardKai:get_source(equip, as_item) |
− | return equip:card() | + | return equip:card(as_item) |
end | end | ||
Line 15: | Line 15: | ||
end | end | ||
if args.icon then | if args.icon then | ||
− | args[1] = equip:icon() | + | args[1] = equip:icon(args.item) |
else | else | ||
− | args[1] = self:get_source(equip) | + | args[1] = self:get_source(equip, args.item) |
end | end | ||
args.link = link | args.link = link |
Revision as of 13:36, 4 October 2019
Documentation for this module may be created at Module:EquipmentCardKai/doc
local EquipmentAsset = require('Module:EquipmentAsset')
local Formatting = require('Module:Formatting')
local EquipmentCardKai = EquipmentAsset()
function EquipmentCardKai:get_source(equip, as_item)
return equip:card(as_item)
end
function EquipmentCardKai:get(equip, args, link)
if not args then
args = equip
equip = args.equipment or args.equip
link = args.link
end
if args.icon then
args[1] = equip:icon(args.item)
else
args[1] = self:get_source(equip, args.item)
end
args.link = link
return Formatting:format_image(args)
end
return EquipmentCardKai