Changes
no edit summary
for _, layer in ipairs(split(args.layers)) do
for _, layer in ipairs(split(args.layers)) do
if self._card_layers[layer] then
if self._card_layers[layer] then
self:_add_layer(layers, self._card_layers[layer])
self:_add_layer(layers, self._card_layers[layer], args)
end
end
end
end
if ship_layers then
if ship_layers then
for _, layer in ipairs(ship_layers) do
for _, layer in ipairs(ship_layers) do
self:_add_layer(layers, self._battle_card_layers[layer])
self:_add_layer(layers, self._battle_card_layers[layer], args)
end
end
end
end
if args.flagship then
if args.flagship then
self:_add_layer(layers, self._battle_card_layers.flagship)
self:_add_layer(layers, self._battle_card_layers.flagship, args)
end
end
if args.layers then
if args.layers then
for _, layer in ipairs(split(args.layers)) do
for _, layer in ipairs(split(args.layers)) do
if self._battle_card_layers[layer] then
if self._battle_card_layers[layer] then
self:_add_layer(layers, self._battle_card_layers[layer])
self:_add_layer(layers, self._battle_card_layers[layer], args)
end
end
end
end
end
end
function ShipCardKai:_add_layer(layers, layer)
function ShipCardKai:_add_layer(layers, layer, args)
table.insert(layers, format{self._image_layer, image = Formatting:format_image{layer.image, caption = layer.caption, size = layer.size}, top = layer.top, left = layer.left})
table.insert(layers, format{self._image_layer, image = Formatting:format_image{layer.image, caption = layer.caption or args.caption, size = layer.size, link = args.link}, top = layer.top, left = layer.left})
end
end