Changes

m
no edit summary
Line 240: Line 240:  
     local result = {}
 
     local result = {}
 
     for _, form in ipairs(forms) do
 
     for _, form in ipairs(forms) do
         if form.normal or form.damaged then
+
         local name, suffix = Ship:process_ship_key(form.name)
            local name, suffix = Ship:process_ship_key(form.name)
+
        suffix = suffix or ""
            suffix = suffix or ""
+
        local title = form.seasonal and suffix or suffix == "" and name == ship_name and "Base" or suffix
            local title = form.seasonal and suffix or suffix == "" and name or suffix
+
        table.insert(result, "<h2>" .. title .. "</h2>")
            table.insert(result, "<h2>" .. title .. "</h2>")
+
        if form.normal then
            if form.normal and form.damaged then
+
            table.insert(result, ShipGraphicKai:Asset({ form.name, link = "nil" }))
                local image = ShipGraphicKai:Asset({ form.name, link = "nil" })
+
        end
                local image_damaged = ShipGraphicKai:Asset({ form.name, link = "nil", damaged = true })
+
        if form.damaged then
                table.insert(result, image)
+
            table.insert(result, ShipGraphicKai:Asset({ form.name, link = "nil", damaged = true }))
                table.insert(result, image_damaged)
  −
            else
  −
                local image = ShipGraphicKai:Asset({ form.name, link = "nil", damaged = form.damaged and true })
  −
                table.insert(result, image)
  −
            end
   
         end
 
         end
 
     end
 
     end
Line 272: Line 267:  
             local name, suffix = Ship:process_ship_key(form.name)
 
             local name, suffix = Ship:process_ship_key(form.name)
 
             suffix = suffix or ""
 
             suffix = suffix or ""
             local title = form.seasonal and suffix or suffix == "" and name or suffix
+
             local title = form.seasonal and suffix or suffix == "" and name == ship_name and "Base" or suffix
 
             table.insert(result, "{{!}}-{{!}}" .. title .. "=")
 
             table.insert(result, "{{!}}-{{!}}" .. title .. "=")
 
             if form.normal and form.damaged then
 
             if form.normal and form.damaged then
cssedit, gkautomate
7,060

edits