• 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
table.insert(result, self._prefix)
+
    if type(self._prefix) == 'string' then
end
+
    table.insert(result, self._prefix)
if self._name_override or self:base_name() then
+
else
    table.insert(result, self._name_override or self:base_name())
+
    table.insert(errors, '_prefix ' .. type(self._prefix))
 +
end
 +
    end
 +
    local name = self._name_override or self:base_name()
 +
if name then
 +
    if type(name) == 'string' then
 +
        table.insert(result, name)
 +
        else
 +
            table.insert(errors, 'name ' .. type(name))
 +
        end
 
end
 
end
 
if self._suffix then
 
if self._suffix then
table.insert(result, self._suffix)
+
    if type(self._suffix) == 'string' then
 +
    table.insert(result, self._suffix)
 +
else
 +
    table.insert(errors, '_suffix ' .. type(self._suffix))
 +
end
 
end
 
end
return table.concat(result, " ")
+
return table.concat(result, " "), table.concat(errors, ", ")
 
end
 
end
  
cssedit, gkautomate
7,064

edits

Navigation menu