Changes

no edit summary
Line 11: Line 11:  
local NodeInfo = BaseTable({
 
local NodeInfo = BaseTable({
 
     _item_class = EnemyShip,
 
     _item_class = EnemyShip,
     _table_start = [[{|class="wikitable" style="width:690px"]],
+
     _table_start = [[{|class="wikitable" style="width:690px" data-number-of-formations="%s"]],
 
     _header_template = [[!#
 
     _header_template = [[!#
 
!Formation
 
!Formation
Line 181: Line 181:  
       air_string = "<span class='explain' title='LBAS: " .. aslb_string .. "'>" .. as_string .. "</span>"
 
       air_string = "<span class='explain' title='LBAS: " .. aslb_string .. "'>" .. as_string .. "</span>"
 
     end
 
     end
 +
    self._number_of_formations = self._number_of_formations + 1
 
table.insert(self._items, {
 
table.insert(self._items, {
 
node = node,
 
node = node,
Line 189: Line 190:  
tags = tags,
 
tags = tags,
 
})
 
})
 +
end
 +
 +
function NodeInfo:create_table_prep()
 +
self._number_of_formations = 0
 
end
 
end
 
   
 
   
function NodeInfo:create_items()  
+
function NodeInfo:create_items()
 
     --Modes are as follows:
 
     --Modes are as follows:
 
     --1 = Node
 
     --1 = Node
Line 461: Line 466:  
     end
 
     end
 
   
 
   
     table.insert(self._rows, self._table_start)
+
     table.insert(self._rows, string.format(self._table_start, self._number_of_formations))
 
     table.insert(self._rows, self._header)
 
     table.insert(self._rows, self._header)
 
end
 
end
Line 583: Line 588:  
     end
 
     end
 
end
 
end
+
 
 
U.registerTableTests(NodeInfo, {
 
U.registerTableTests(NodeInfo, {
 
     { "A", "Normal/Clear", "Line Ahead", "Northern Princess" }
 
     { "A", "Normal/Clear", "Line Ahead", "Northern Princess" }
cssedit, gkautomate
7,064

edits