Changes
no edit summary
local result = {}
local result = {}
local consumed_equipment_table = row_data.resources.equipment or {}
local consumed_equipment_table = row_data.resources.equipment or {}
if row_data.resources.equipment == nil then
consumed_equipment_table[false] = false
end
local consumed_equipment = {}
local consumed_equipment = {}
for equip, count in pairs(consumed_equipment_table) do
for equip, count in pairs(consumed_equipment_table) do
local equipment = equip ~= true and Equipment(equip) or row_data.item
local equipment
if equip ~= true then
if equip == false then
equipment = Equipment()
else
equipment = Equipment(equip)
end
else
equipment = row_data.item
end
table.insert(consumed_equipment, format{self._equipment_item, count = count or Formatting:format_stat(nil), icon = Formatting:format_image{Formatting:format_equipment_icon_simple(equipment:icon()), size = self._small_icon_size}, name = equip == true and Formatting:format_stat(equipment:name()) or Formatting:format_link(equipment:link())})
table.insert(consumed_equipment, format{self._equipment_item, count = count or Formatting:format_stat(nil), icon = Formatting:format_image{Formatting:format_equipment_icon_simple(equipment:icon()), size = self._small_icon_size}, name = equip == true and Formatting:format_stat(equipment:name()) or Formatting:format_link(equipment:link())})
end
end