Changes

m
no edit summary
Line 6: Line 6:  
local format = require('Module:StringInterpolation').format
 
local format = require('Module:StringInterpolation').format
   −
local NanaminFleet = BaseTable{
+
local NanaminFleet = BaseTable({
 
     _item_class = Ship,
 
     _item_class = Ship,
 
     _equip_class = Equipment,
 
     _equip_class = Equipment,
 
     _equip_bg = "whitesmoke",
 
     _equip_bg = "whitesmoke",
     _header_template = [[! style="background-color: lightskyblue;" |Ship
+
     _header_template = nil,
    ! style="background-color: lightskyblue;" |Equipment
  −
    ! style="background-color: lightskyblue;" |Ship
  −
    ! style="background-color: lightskyblue;" |Equipment]],
   
     _column_cell_templates = {
 
     _column_cell_templates = {
 
         ship = [[| rowspan="4" style="background: transparent;" |${values.ship_card}]],
 
         ship = [[| rowspan="4" style="background: transparent;" |${values.ship_card}]],
Line 28: Line 25:  
     _blank = "blank.png",
 
     _blank = "blank.png",
 
     _default_size = ShipCardKai._card_size
 
     _default_size = ShipCardKai._card_size
}
+
})
    
function NanaminFleet:create_table_prep()
 
function NanaminFleet:create_table_prep()
Line 56: Line 53:  
function NanaminFleet:equips2(row)
 
function NanaminFleet:equips2(row)
 
     return self:equips(row)
 
     return self:equips(row)
end
  −
  −
function NanaminFleet:start_rows()
  −
    self._rows = {}
  −
end
  −
  −
function NanaminFleet:finish_rows()
  −
    return
   
end
 
end
   Line 115: Line 104:  
         table.insert(self._data_rows, row_values)
 
         table.insert(self._data_rows, row_values)
 
     end
 
     end
 +
end
 +
 +
function NanaminFleet:create_header()
 +
    self._header = format(self._header_template, {})
 
end
 
end
    
return NanaminFleet
 
return NanaminFleet
48

edits