Changes
reference_type now takes a comma-separated list
local StatIcons = require('Module:StatIcons')
local StatIcons = require('Module:StatIcons')
local format = require('Module:StringInterpolation').format
local format = require('Module:StringOperations').format
local split = require('Module:StringOperations').split
local EliteShipsKai = BaseTable({
local EliteShipsKai = BaseTable({
local ship_type = ship:type()
local ship_type = ship:type()
local value = class:short_base_name()
local value = class:short_base_name()
local show_type
local show_type
if reference_type then
if self._reference_types then
show_type = ship_type ~= tonumber(reference_type)
show_type = not self._reference_types[ship_type]
else
else
show_type = ship_type ~= class:base_type()
show_type = ship_type ~= class:base_type()
EliteShipsKai.create_data_rows = EliteShipsKai.create_data_rows_merge_vertical
EliteShipsKai.create_data_rows = EliteShipsKai.create_data_rows_merge_vertical
function EliteShipsKai:create_table_prep()
if self._args.reference_type then
self._reference_types = {}
for _, reference_type in ipairs(split(self._args.reference_type, ',%s*')) do
self._reference_types[tonumber(reference_type)] = true
end
end
end
function EliteShipsKai:create_header()
function EliteShipsKai:create_header()