• 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
no edit summary
Line 242: Line 242:  
local availability = {}
 
local availability = {}
 
local available = false
 
local available = false
 +
local bg_color = self._unavailable_color
 
if row_data.ships then
 
if row_data.ships then
 
for index, ship in ipairs(row_data.ships) do
 
for index, ship in ipairs(row_data.ships) do
if row_data.availability[ship][day] then
+
    local local_availability = row_data.availability[ship][day]
 +
if local_availability ~= false then
 
available = true
 
available = true
 
local ship_initial
 
local ship_initial
if ship ~= true then
+
if local_availability == nil then
ship_initial = mw.ustring.sub(row_data.ship_data[ship]:name(), 1, 1)
+
    ship_initial = "?"
 +
    bg_color = self._transparent
 
else
 
else
ship_initial = "✓"
+
    if ship ~= true then
 +
    ship_initial = mw.ustring.sub(row_data.ship_data[ship]:name(), 1, 1)
 +
    else
 +
    ship_initial = "✓"
 +
    end
 +
    bg_color = self._available_color
 
end
 
end
 
table.insert(availability, ship_initial)
 
table.insert(availability, ship_initial)
Line 256: Line 264:  
table.insert(availability, " ")
 
table.insert(availability, " ")
 
end
 
end
end
+
    end
 
end
 
end
return {values = {value = available and table.concat(availability, "<br />") or "✗"}, bg_color = available and self._available_color or self._unavailable_color, text_align = self._center_align}
+
return {values = {value = available and table.concat(availability, "<br />") or "✗"}, bg_color = bg_color, text_align = self._center_align}
 
end
 
end
  
Anonymous user

Navigation menu