- 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:EquipmentCardListKai"
Jump to navigation
Jump to search
com>Ckwng (Created page with "local CardList = require('Module:CardList') local Equipment = require('Module:Equipment') local EquipmentCardKai = require('Module:EquipmentCardKai') local Formatting = requir...") |
com>Ckwng |
||
Line 10: | Line 10: | ||
} | } | ||
− | function EquipmentCardListKai:card( | + | function EquipmentCardListKai:card(equipment) |
local value | local value | ||
− | if | + | if equipment == false then |
value = Formatting:format_image{self._blank, size = self._size} | value = Formatting:format_image{self._blank, size = self._size} | ||
else | else | ||
− | value = EquipmentCardKai:card{ | + | value = EquipmentCardKai:card{equipment = equipment, size = self._size, link = equipment:link(), caption = equipment: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} |
Revision as of 21:53, 12 April 2015
Documentation for this module may be created at Module:EquipmentCardListKai/doc
local CardList = require('Module:CardList')
local Equipment = require('Module:Equipment')
local EquipmentCardKai = require('Module:EquipmentCardKai')
local Formatting = require('Module:Formatting')
local EquipmentCardListKai = CardList{
_item_class = Equipment,
_blank = "Empty equipment slot.png",
_default_size = EquipmentCardKai._card_size,
}
function EquipmentCardListKai:card(equipment)
local value
if equipment == false then
value = Formatting:format_image{self._blank, size = self._size}
else
value = EquipmentCardKai:card{equipment = equipment, size = self._size, link = equipment:link(), caption = equipment:name()}
end
return {values = {value = value}, bg_color = self._transparent, text_align = self._center_align}
end
return EquipmentCardListKai