Line 41: |
Line 41: |
| table.insert(tbl.rows, {}) | | table.insert(tbl.rows, {}) |
| local row = tbl.rows[#tbl.rows] | | local row = tbl.rows[#tbl.rows] |
− | mw.log(arg_name, #tbl.rows)
| |
| row.id = arg_name | | row.id = arg_name |
| row.ship = ship | | row.ship = ship |
Line 68: |
Line 67: |
| | | |
| local table_format = { | | local table_format = { |
− | header = '{| class="wikitable sortable" align="center" width="100%" style="text-align:center"\n!#\n!Type\n!Ship\n', | + | header = '{| class="wikitable sortable" align="center" width="100%" style="text-align:center"\n!Type\n!Ship\n', |
| header_node = '!width="10%%"|%s\n', | | header_node = '!width="10%%"|%s\n', |
| header_boss_node = '!width="10%%" style="background-color:pink;color:red;"|\'\'\'%s\'\'\'\n', | | header_boss_node = '!width="10%%" style="background-color:pink;color:red;"|\'\'\'%s\'\'\'\n', |
Line 90: |
Line 89: |
| -- rows | | -- rows |
| for key, row in pairs(tbl.rows) do | | for key, row in pairs(tbl.rows) do |
− | mw.log(arg_name)
| |
| res = res .. table_format.row | | res = res .. table_format.row |
− | res = res .. string.format(table_format.cell, row.id) | + | -- res = res .. string.format(table_format.cell, row.id) |
| res = res .. string.format(table_format.cell, row.type) | | res = res .. string.format(table_format.cell, row.type) |
| res = res .. string.format(table_format.ship_cell, row.ship) | | res = res .. string.format(table_format.ship_cell, row.ship) |