Include sortByType and inverses in sorting types
This commit is contained in:
parent
70c55a42f0
commit
8ed9e48dfe
@ -286,6 +286,10 @@ local PAGES = {
|
||||
return _genSort(function(v) return v:getSimpleName() end, invert, tiebreaker)
|
||||
end
|
||||
|
||||
local function sortByType(invert, tiebreaker)
|
||||
return _genSort(function(v) return v:getName() end, invert, tiebreaker)
|
||||
end
|
||||
|
||||
local function sortByDamage(invert, tiebreaker)
|
||||
return _genSort(function(v)
|
||||
local damage = v:getDamage()
|
||||
@ -311,8 +315,12 @@ local PAGES = {
|
||||
end
|
||||
|
||||
local SORT_MODE = {
|
||||
composeSortFuncs(sortByCount, sortByName, sortByDamage),
|
||||
composeSortFuncs(sortByName, sortByDamage, sortByCount)
|
||||
composeSortFuncs(sortByCount, sortByName, sortByType, sortByDamage),
|
||||
composeSortFuncs(sortByName, sortByType, sortByDamage, sortByCount),
|
||||
composeSortFuncs(sortByType, sortByDamage, sortByCount, sortByName),
|
||||
composeSortFuncs(sortByCount, true, sortByName, sortByType, sortByDamage),
|
||||
composeSortFuncs(sortByName, true, sortByType, sortByDamage, sortByCount),
|
||||
composeSortFuncs(sortByType, true, sortByDamage, sortByCount, sortByName)
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user