• 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"

From Kancolle Wiki
Jump to navigation Jump to search
com>Ckwng
(Refactor)
com>Ckwng
Line 16: Line 16:
 
return Formatting:format_image{self:get_source(equip), 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

Revision as of 23:24, 23 September 2015

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)
	return equip:card()
end

function EquipmentCardKai:get(equip, args, link)
	if not args then
		args = equip
		equip = args.equipment or args.equip
		link = args.link
	end
	return Formatting:format_image{self:get_source(equip), size = args.size, link = link, caption = args.caption}
end

return EquipmentCardKai