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

From Kancolle Wiki
Jump to navigation Jump to search
com>Ckwng
(Created page with "local Formatting = require('Module:Formatting') local ShipCardKai = require('Module:ShipCardKai') local ShipCardListKai = require('Module:ShipCardListKai') local ShipBattleCa...")
 
com>Ckwng
Line 5: Line 5:
 
local ShipBattleCardListKai = ShipCardListKai{
 
local ShipBattleCardListKai = ShipCardListKai{
 
_default_size = ShipCardKai._battle_card_size,
 
_default_size = ShipCardKai._battle_card_size,
 +
_blank = "blank.png",
 
}
 
}
  

Revision as of 09:14, 8 April 2015

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

local Formatting = require('Module:Formatting')
local ShipCardKai = require('Module:ShipCardKai')
local ShipCardListKai = require('Module:ShipCardListKai')

local ShipBattleCardListKai = ShipCardListKai{
	_default_size = ShipCardKai._battle_card_size,
	_blank = "blank.png",
}

function ShipBattleCardListKai:card(ship)
	local value
	if ship == false then
		value = Formatting:format_image{self._blank, size = self._size}
	else
		value = ShipCardKai:battle_card{ship = ship, size = self._size, link = ship:link(), caption = ship:name()}
	end
	return {values = {value = value}, bg_color = self._transparent, text_align = self._center_align}
end

return ShipBattleCardListKai