• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
m
no edit summary
Line 26: Line 26:  
function ShipClassData:name_override()
 
function ShipClassData:name_override()
 
local result = {}
 
local result = {}
local errors = {}
   
if self._prefix then
 
if self._prefix then
    if type(self._prefix) == 'string' then
+
        table.insert(result, self._prefix)
    table.insert(result, self._prefix)
  −
else
  −
    table.insert(errors, '_prefix ' .. type(self._prefix))
  −
end
   
     end
 
     end
 
     local name = self._name_override or self:base_name()
 
     local name = self._name_override or self:base_name()
 
if name then
 
if name then
    if type(name) == 'string' then
+
        table.insert(result, name)
        table.insert(result, name)
  −
        else
  −
            table.insert(errors, '_name_override ' .. type(self._name_override) .. ', base_name ' .. type(self:base_name()))
  −
            local s = ''
  −
            if type(self:base_name()) == 'table' then
  −
                for k, v in pairs(self:base_name()) do
  −
                    s = s .. '; ' .. k
  −
                end
  −
                table.insert(errors, s)
  −
            end
  −
        end
   
end
 
end
 
if self._suffix then
 
if self._suffix then
    if type(self._suffix) == 'string' then
+
    table.insert(result, self._suffix)
    table.insert(result, self._suffix)
  −
else
  −
    table.insert(errors, '_suffix ' .. type(self._suffix))
  −
end
   
end
 
end
return table.concat(result, " "), table.concat(errors, ", ")
+
return table.concat(result, " ")
 
end
 
end
  
cssedit, gkautomate
6,928

edits

Navigation menu