Changes

no edit summary
Line 53: Line 53:  
_all = "All",
 
_all = "All",
 
_all_except = "All except ",
 
_all_except = "All except ",
_ship_image_template = "${ship_type} ${ship_name} ${api_id:3} ${image_type}.${extension}",
+
_ship_image_template = "Ship ${image_type} ${ship_name}${suffix}.${extension}",
_ship_image_simple_template = "${ship_name} ${image_type}.${extension}",
+
_ship_image_simple_template = "Ship ${image_type} ${ship_name}${suffix}.${extension}",
 
_equipment_image_template = "Equipment ${image_type} ${equipment_name}.png",
 
_equipment_image_template = "Equipment ${image_type} ${equipment_name}.png",
 
_equipment_image_template_simple = "${equipment_name} ${image_type}.png",
 
_equipment_image_template_simple = "${equipment_name} ${image_type}.png",
Line 191: Line 191:     
function Formatting:ship_card(api_id, ship_name, ship_type, extension_override, simple_naming, hd)
 
function Formatting:ship_card(api_id, ship_name, ship_type, extension_override, simple_naming, hd)
     return self:ship_image_simple(self._card_suffix, ship_name, extension_override)
+
     return self:ship_image_simple(self._card_suffix, ship_name, extension_override, '')
 
end
 
end
    
function Formatting:ship_card_damaged(api_id, ship_name, ship_type, extension_override, simple_naming, hd)
 
function Formatting:ship_card_damaged(api_id, ship_name, ship_type, extension_override, simple_naming, hd)
    if hd then
+
return self:ship_image(self._card_suffix, api_id, ship_name, ship_type, extension_override, ' Damaged')
        return self:ship_image_simple(self._card_damaged_suffix, ship_name, extension_override)
  −
    end
  −
    if simple_naming then
  −
        return self:ship_image_simple(self._card_damaged_suffix, ship_name, extension_override)
  −
    end
  −
return self:ship_image(self._card_damaged_suffix, api_id, ship_name, ship_type, extension_override)
   
end
 
end
    
function Formatting:ship_battle_card(api_id, ship_name, ship_type, extension_override, simple_naming, hd)
 
function Formatting:ship_battle_card(api_id, ship_name, ship_type, extension_override, simple_naming, hd)
    if hd then
+
return self:ship_image(self._battle_card_suffix, api_id, ship_name, ship_type, extension_override, '')
        return self:ship_image_simple(self._banner_suffix, ship_name, extension_override)
  −
    end
  −
    if simple_naming then
  −
        return self:ship_image_simple(self._battle_card_suffix, ship_name, extension_override)
  −
    end
  −
return self:ship_image(self._battle_card_suffix, api_id, ship_name, ship_type, extension_override)
   
end
 
end
    
function Formatting:ship_battle_card_damaged(api_id, ship_name, ship_type, extension_override, simple_naming, hd)
 
function Formatting:ship_battle_card_damaged(api_id, ship_name, ship_type, extension_override, simple_naming, hd)
    if hd then
+
     return self:ship_image(self._battle_card_suffix, api_id, ship_name, ship_type, extension_override, ' Damaged')
        return self:ship_image_simple(self._banner_damaged_suffix, ship_name, extension_override)
  −
    end
  −
    if simple_naming then
  −
        return self:ship_image_simple(self._battle_card_damaged_suffix, ship_name, extension_override)
  −
    end
  −
     return self:ship_image(self._battle_card_damaged_suffix, api_id, ship_name, ship_type, extension_override)
   
end
 
end
    
function Formatting:ship_cg(api_id, ship_name, ship_type, extension_override, simple_naming, hd)
 
function Formatting:ship_cg(api_id, ship_name, ship_type, extension_override, simple_naming, hd)
    if hd then
+
     return self:ship_image(self._cg_suffix, api_id, ship_name, ship_type, extension_override, '')
        return self:ship_image_simple(self._cg_suffix, ship_name, extension_override)
  −
    end
  −
if simple_naming then
  −
return self:ship_image_simple(self._cg_suffix, ship_name, extension_override)
  −
end
  −
     return self:ship_image(self._cg_suffix, api_id, ship_name, ship_type, extension_override)
   
end
 
end
    
function Formatting:ship_cg_damaged(api_id, ship_name, ship_type, extension_override, simple_naming, hd)
 
function Formatting:ship_cg_damaged(api_id, ship_name, ship_type, extension_override, simple_naming, hd)
    if hd then
+
     return self:ship_image(self._cg_suffix, api_id, ship_name, ship_type, extension_override, ' Damaged')
        return self:ship_image_simple(self._cg_damaged_suffix, ship_name, extension_override)
  −
    end
  −
if simple_naming then
  −
return self:ship_image_simple(self._cg_damaged_suffix, ship_name, extension_override)
  −
end
  −
     return self:ship_image(self._cg_damaged_suffix, api_id, ship_name, ship_type, extension_override)
   
end
 
end
   −
function Formatting:ship_image(image_type, api_id, ship_name, ship_type, extension_override)
+
function Formatting:ship_image(image_type, api_id, ship_name, ship_type, extension_override, suffix)
 
return format{
 
return format{
 
    self._ship_image_template,
 
    self._ship_image_template,
Line 250: Line 220:  
    api_id = api_id,
 
    api_id = api_id,
 
    ship_name = ship_name,
 
    ship_name = ship_name,
    ship_type = self:format_ship_code(ship_type),
+
    suffix = suffix,
 
    extension = extension_override or self._default_extension[image_type] or 'png',
 
    extension = extension_override or self._default_extension[image_type] or 'png',
 
}
 
}
cssedit, gkautomate
7,064

edits