Changes

no edit summary
Line 3: Line 3:     
function ShipData:name(raw)
 
function ShipData:name(raw)
 +
if self._suffix and not raw then
 +
return self:base_name() .. " " .. self._suffix
 +
else
 +
return self:base_name(raw)
 +
end
 +
end
 +
 +
function ShipData:base_name(raw)
 
return self:format_stat(self._name, raw)
 
return self:format_stat(self._name, raw)
 +
end
 +
 +
function ShipData:link(raw)
 +
if self._suffix then
 +
return mw.ustring.format(self._aliased_link, self:base_name(), self:name())
 +
else
 +
return mw.ustring.format(self._simple_link, self:name())
 +
end
 
end
 
end
   Line 173: Line 189:  
return "- Unequipped -"
 
return "- Unequipped -"
 
else
 
else
return equipment:name()
+
return equipment:link()
 
end
 
end
 
end
 
end
Line 274: Line 290:  
function ShipData:create(ship)
 
function ShipData:create(ship)
 
ship = ship or {}
 
ship = ship or {}
setmetatable(ship, self)
+
setmetatable(ship, ship)
self.__index = self
+
ship.__index = self
 
return ship
 
return ship
 
end
 
end
Anonymous user