Changes

no edit summary
Line 46: Line 46:  
end
 
end
   −
function EnemyColors:variant_background_image(ship, background_image)
+
function EnemyColors:variant_background_image(ship, original_background_image)
 
local back = ship:back()
 
local back = ship:back()
local extra_style = {}
+
local background_image = {}
 
if back <= -4 and back >= -6 then
 
if back <= -4 and back >= -6 then
table.insert(extra_style, self._kai_glow_background_image)
+
table.insert(background_image, self._kai_glow_background_image)
 
elseif back <= -7 and back >= -9 then
 
elseif back <= -7 and back >= -9 then
table.insert(extra_style, self._late_model_glow_background_image)
+
table.insert(background_image, self._late_model_glow_background_image)
 
end
 
end
 
if back >= -9 then
 
if back >= -9 then
 
local enemy_variant = math.abs(back) % 3
 
local enemy_variant = math.abs(back) % 3
 
if enemy_variant == 2 then
 
if enemy_variant == 2 then
table.insert(extra_style, self._elite_glow_background_image)
+
table.insert(background_image, self._elite_glow_background_image)
 
elseif enemy_variant == 0 then
 
elseif enemy_variant == 0 then
table.insert(extra_style, self._flagship_glow_background_image)
+
table.insert(background_image, self._flagship_glow_background_image)
 
end
 
end
 
end
 
end
if background_image then
+
if original_background_image then
table.insert(extra_style, background_image)
+
table.insert(background_image, original_background_image)
 +
end
 +
if #background_image > 0 then
 +
return table.concat(background_image, ", ")
 
end
 
end
return table.concat(extra_style, ", ")
   
end
 
end
    
return EnemyColors
 
return EnemyColors
Anonymous user