Changes

no edit summary
Line 212: Line 212:  
else
 
else
 
return equipment:link()
 
return equipment:link()
 +
end
 +
end
 +
 +
function ShipData:equipment_icon(slot, raw)
 +
local equipment_slot = self._equipment[slot]
 +
if not equipment_slot then
 +
return not raw and "- Locked -" or nil
 +
end
 +
local equipment = equipment_slot["equipment"]
 +
if raw then
 +
return equipment:icon(raw)
 +
elseif equipment == nil then
 +
return "??"
 +
elseif equipment == false then
 +
return self.format_image("Xx_c.png")
 +
else
 +
return equipment:icon()
 
end
 
end
 
end
 
end
Anonymous user