• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Module:ShipCardKai

From Kancolle Wiki
Revision as of 17:18, 6 April 2015 by com>Ckwng (Created page with "local Ship = require('Module:Ship') local Formatting = require('Module:Formatting') local ShipCardKai = { _card_size = "218x300px", _battle_card_size = "160x40px", } funct...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Documentation for this module may be created at Module:ShipCardKai/doc

local Ship = require('Module:Ship')
local Formatting = require('Module:Formatting')

local ShipCardKai = {
	_card_size = "218x300px",
	_battle_card_size = "160x40px",
}

function ShipCardKai:Card(args)
	local ship = self:create_ship()
	return Formatting:format_image{ship:card(), size = self._card_size, link = args.link, caption = args.caption}
end

function ShipCardKai:Card(args)
	local ship = self:create_ship()
	return Formatting:format_image{ship:battle_card(), size = self._battle_card_size, link = args.link, caption = args.caption}
end

function ShipCardKai:create_ship(args)
	return Ship(args.name, args.model)
end

return ShipCardKai