• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
reference_type now takes a comma-separated list
Line 6: Line 6:  
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({
Line 84: Line 85:  
local ship_type = ship:type()
 
local ship_type = ship:type()
 
local value = class:short_base_name()
 
local value = class:short_base_name()
local reference_type = self._args.reference_type
   
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()
Line 228: Line 228:     
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()
Anonymous user

Navigation menu