- 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
Line 53:
Line 53:
+
− self._left_modernization = self._left and self._left:modernization() or false
− +
− +
+
+
+
+
+
+
+
+
+
Line 192:
Line 201:
− local even = false
− if item == "empty" then +
− if even then+
− right = false+
− table.insert(items, {left, right})
− left = false
− right = false
− even = false
− else
− left = false
− even = true
− end
− else
− if even then
− table.insert(items, {left, right})
− left = false
− even = false
− end
− +
+
+
+
− table.insert(items, {left, right})
− left = false
− right = false
− even = false
− even = true +
− +
Completely change call signature
function ShipModernizationListKai:class(pair)
function ShipModernizationListKai:class(pair)
self._left = pair[1]
self._left = pair[1]
self._left_modernization = self._left and self._left:modernization() or false
self._right = pair[2]
self._right = pair[2]
self._right_modernization = self._right and self._right:modernization() or false
self._right_modernization = self._right and self._right:modernization() or false
local class = (pair[1] or pair[2]):class()
local left_class, right_class, class_name = self._left and self._left:class(), self._right and self._right:class(), false
return {values = {value = class and class:base_name() or self._question_marks}, bg_color = self._transparent, text_align = self._center_align}
if left_class or right_class then
if left_class == right_class or not right_class then
class_name = left_class:base_name()
elseif not left_class then
class_name = right_class:base_name()
else
class_name = left_class:base_name() .. "/" .. right_class:base_name()
end
end
return {values = {value = class_name or self._question_marks}, bg_color = self._transparent, text_align = self._center_align}
end
end
local left = false
local left = false
local right = false
local right = false
for _, item in ipairs(self._items) do
for _, item in ipairs(self._items) do
if type(item) == "string" then
if type(item) == "string" then
table.insert(items, {left, right})
left, right = false, false
if item == "break" then
table.insert(items, item)
table.insert(items, item)
end
end
elseif even then
elseif left then
if right then
table.insert(items, {left, right})
end
right = item
right = item
else
else
left = item
left = item
right = false
end
end
end
end
if even then
if left then
table.insert(items, {left, right})
table.insert(items, {left, right})
end
end