Changes

Fix improvement_brackets()
Line 335: Line 335:     
function EquipmentData:improvement_brackets(product)
 
function EquipmentData:improvement_brackets(product)
if self._improvements and self._improvements._products and self._improvements._products[product] then
+
if self._improvements and self._improvements._products then
 
if self._brackets == nil then
 
if self._brackets == nil then
 
self._brackets = {}
 
self._brackets = {}
 
end
 
end
for bracket, _ in pairs(self._improvements._products[product]) do
+
if not self._brackets[product] and self._improvements._products[product] then
if type(bracket) == "number" then
+
for bracket, _ in pairs(self._improvements._products[product]) do
table.insert(self._brackets, bracket)
+
if type(bracket) == "number" then
 +
table.insert(self._brackets, bracket)
 +
end
 
end
 
end
 +
table.sort(self._brackets)
 
end
 
end
table.sort(self._brackets)
+
return self._brackets[product]
 
end
 
end
 
end
 
end
Anonymous user