Commit 4e325b18 authored by Fedja Beader's avatar Fedja Beader
Browse files

Add (unused, for completeness) ItemLocations:sort_by_count_asc()

parent be31f897
......@@ -124,6 +124,10 @@ function ItemLocations:collect(inventory_loc, list_name, item_name)
end
end
function ItemLocations:sort_by_count_asc()
table.sort(self.locations, function(lhs,rhs) return lhs:get_count() < rhs:get_count() end)
end
function ItemLocations:sort_by_count_dsc()
table.sort(self.locations, function(lhs,rhs) return lhs:get_count() > rhs:get_count() end)
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment