- 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 244:
Line 244:
− +
− local local_availability = row_data.availability[ship][day]+
− ship_initial = "?"+
− bg_color = self._transparent
− 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+
Line 266:
Line 265:
− end+
+
+
+
no edit summary
local availability = {}
local availability = {}
local available = false
local available = false
local bg_color = self._unavailable_color
local bg_color = self._transparent
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
local local_availability = row_data.availability[ship][day]
if local_availability ~= false then
if local_availability ~= false then
available = true
available = true
local ship_initial
local ship_initial
if local_availability == nil then
if local_availability == nil then
ship_initial = "?"
else
else
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)
table.insert(availability, " ")
table.insert(availability, " ")
end
end
end
end
if not available then
bg_color = self._unavailable_color
end
end
return {values = {value = available and table.concat(availability, "<br />") or "✗"}, bg_color = bg_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}