Changes

no edit summary
Line 12: Line 12:  
   {world = 6, maps = 5},
 
   {world = 6, maps = 5},
 
   {world = 7, maps = 3}
 
   {world = 7, maps = 3}
}
  −
  −
local rarityStyles = {
  −
  [1] = "background-color:#8ac;color:#000",
  −
  [2] = "background-color:#ace;color:#000",
  −
  [3] = "background-color:#0ff;color:#000",
  −
  [4] = "background-color:#bbb;color:#000",
  −
  [5] = "background-color:#fc0;color:#000",
  −
  [6] = "background-color:#faf;color:#000",
  −
  [7] = "background-color:#f5f;color:#000",
  −
  [8] = "background-color:#a0a;color:#000"
   
}
 
}
   Line 30: Line 19:  
   local result = {
 
   local result = {
 
     string.format(
 
     string.format(
       [=[<tr><td>[[%s]]</td><td style="%s">%s</td><td>[[%s]]</td><td>%s</td>]=],
+
       [=[<tr><td>[[%s]]</td><td%s>%s</td><td>[[%s]]</td><td>%s</td>]=],
 
       shipName,
 
       shipName,
       rarityStyles[ship:back()] or "",
+
       ship:back() and string.format(' style="background-color:%s;color:black"', Formatting:format_ship_back(ship:back())) or "",
 
       Formatting:format_ship_rarity(ship:back()),
 
       Formatting:format_ship_rarity(ship:back()),
 
       Formatting:format_ship_code(ship:type()),
 
       Formatting:format_ship_code(ship:type()),
Line 60: Line 49:  
     table.insert(result, string.format([=[<th colspan="%s">[[World %s]]</th>]=], e.maps, e.world))
 
     table.insert(result, string.format([=[<th colspan="%s">[[World %s]]</th>]=], e.maps, e.world))
 
   end
 
   end
   table.insert(result, [[<th rowspan="2">Remarks</th>]])
+
   table.insert(result, [[<th rowspan="2">Remarks</th></tr><tr>]])
  table.insert(result, "</tr>")
  −
  table.insert(result, "<tr>")
   
   for _, e in ipairs(worlds) do
 
   for _, e in ipairs(worlds) do
 
     for map = 1, e.maps do
 
     for map = 1, e.maps do
cssedit, gkautomate
7,064

edits