- 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:ShipCardListKai"
Jump to navigation
Jump to search
com>Ckwng |
m (File changed) |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | local | + | local CardList = require('Module:CardList') |
local Formatting = require('Module:Formatting') | local Formatting = require('Module:Formatting') | ||
local Ship = require('Module:Ship') | local Ship = require('Module:Ship') | ||
local ShipCardKai = require('Module:ShipCardKai') | local ShipCardKai = require('Module:ShipCardKai') | ||
− | local ShipCardListKai = | + | local ShipCardListKai = CardList{ |
_item_class = Ship, | _item_class = Ship, | ||
− | + | _blank = "Empty Ship Card.png", | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | _blank = " | ||
_default_size = ShipCardKai._card_size, | _default_size = ShipCardKai._card_size, | ||
+ | _column_count = 5, | ||
} | } | ||
Line 25: | Line 16: | ||
value = Formatting:format_image{self._blank, size = self._size} | value = Formatting:format_image{self._blank, size = self._size} | ||
else | else | ||
− | value = ShipCardKai: | + | value = ShipCardKai:get{ship = ship, size = self._size, link = ship:link(), caption = ship:name()} |
end | end | ||
return {values = {value = value}, bg_color = self._transparent, text_align = self._center_align} | return {values = {value = value}, bg_color = self._transparent, text_align = self._center_align} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
end | end | ||
return ShipCardListKai | return ShipCardListKai |
Latest revision as of 14:13, 3 January 2022
Documentation for this module may be created at Module:ShipCardListKai/doc
local CardList = require('Module:CardList')
local Formatting = require('Module:Formatting')
local Ship = require('Module:Ship')
local ShipCardKai = require('Module:ShipCardKai')
local ShipCardListKai = CardList{
_item_class = Ship,
_blank = "Empty Ship Card.png",
_default_size = ShipCardKai._card_size,
_column_count = 5,
}
function ShipCardListKai:card(ship)
local value
if ship == false then
value = Formatting:format_image{self._blank, size = self._size}
else
value = ShipCardKai:get{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 ShipCardListKai