Changes
no edit summary
}
}
function ShipData:name(raw)
function ShipData:name()
local suffix = self:display_suffix()
return self:base_name() .. " " .. (raw and self:suffix() or self:display_suffix())
if suffix ~= false then
return self:base_name() .. " " .. suffix
else
else
return self:base_name()
return self:base_name()
end
end
end
function ShipData:unique_name()
return self:base_name() .. " " .. self:suffix()
end
end
function ShipData:display_suffix()
function ShipData:display_suffix()
if self._display_suffix == false then
if self._display_suffix ~= nil then
return self._display_suffix
return self._display_suffix
end
end
return self._display_suffix or self._suffix
return self._suffix
end
end
function ShipData:slots()
function ShipData:slots()
if self._equipment then
if self._equipment then
local i = 0
for _, v in ipairs(self._equipment) do
size = v.size
if size ~= false then
i = i + 1
end
end
return i
end
end
return nil
return nil
local size
local size
for _, v in ipairs(self._equipment) do
for _, v in ipairs(self._equipment) do
size = v["size"]
size = v.size
if size == nil then
if size == nil then
total_space = nil
total_space = nil
function ShipData:asw_attack()
function ShipData:asw_attack()
return self._asw_attack
return self._asw_attack
end
function ShipData:seasonal()
return self._seasonal
end
end