Changes

Add detailed availability exception for current event
Line 168: Line 168:  
end
 
end
 
elseif method == "event_reward" then
 
elseif method == "event_reward" then
local details = {}
+
local details, current_event_details = {}, {}
 
if availability.event_reward then
 
if availability.event_reward then
 
for _, map in ipairs(availability.event_reward) do
 
for _, map in ipairs(availability.event_reward) do
Line 176: Line 176:  
end
 
end
 
table.insert(details, map_name)
 
table.insert(details, map_name)
 +
if map[1] == 2016 and map[2] == 7 then
 +
    table.insert(current_event_details, map_name)
 +
end
 
end
 
end
 
end
 
end
 
if #details > 0 and self._detailed_availability then
 
if #details > 0 and self._detailed_availability then
 
details = format{self._details_template, details = table.concat(details, ", ")}
 
details = format{self._details_template, details = table.concat(details, ", ")}
 +
elseif #current_event_details > 0 then
 +
details = format{self._details_template, details = table.concat(current_event_details, ", ")}
 
else
 
else
 
details = ""
 
details = ""
Line 185: Line 190:  
table.insert(result, self._event_reward_label .. details)
 
table.insert(result, self._event_reward_label .. details)
 
elseif method == "event_drop" then
 
elseif method == "event_drop" then
local details = {}
+
local details, current_event_details = {}, {}
 
if availability.event_drop then
 
if availability.event_drop then
 
for _, drop in ipairs(availability.event_drop) do
 
for _, drop in ipairs(availability.event_drop) do
Line 201: Line 206:  
node_name = node_name .. format{self._node_formation_template, formation = complex and drop[5][node] or drop[5]}
 
node_name = node_name .. format{self._node_formation_template, formation = complex and drop[5][node] or drop[5]}
 
end
 
end
table.insert(details, node_name)
+
    table.insert(details, node_name)
 +
    if drop[1] == 2016 and drop[2] == 7 then
 +
        table.insert(current_event_details, map_name)
 +
    end
 
end
 
end
 
end
 
end
Line 213: Line 221:  
table.insert(result, self._event_drop_label .. details)
 
table.insert(result, self._event_drop_label .. details)
 
end
 
end
 +
elseif #current_event_details > 0 then
 +
current_event_details = format{self._details_template, details = table.concat(current_event_details, ", ")}
 +
table.insert(result, self._event_drop_label .. current_event_details)
 
else
 
else
 
table.insert(result, self._event_drop_label)
 
table.insert(result, self._event_drop_label)
Anonymous user