Skip to content

Commit

Permalink
Create filter_buttons_config.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
Kanopedia authored Jan 16, 2025
1 parent f7c09b3 commit 47292cf
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
-- @Liquipedia
-- wiki=hearthstone
-- page=Module:FilterButtons/Config
--
-- Please see https://github.com/Liquipedia/Lua-Modules to contribute
--

local Tier = require('Module:Tier/Utils')
local Config = {}

Config.categories = {
{
name = 'liquipediatier',
property = 'liquipediaTier',
load = function(category)
category.items = {}
for _, tier in Tier.iterate('tiers') do
table.insert(category.items, tier.value)
end
end,
defaultItems = {'1', '2', '3', '4'},
transform = function(tier)
return Tier.toName(tier)
end,
},
}

return Config

0 comments on commit 47292cf

Please sign in to comment.