Always show hot variants in filter menus
This commit is contained in:
parent
ff57a87914
commit
407068968c
1 changed files with 6 additions and 1 deletions
|
@ -17,7 +17,7 @@ function createHotVariant(config)
|
|||
local hotItem = table.deepcopy(data.raw.item[itemName])
|
||||
hotItem.name = "hot-" .. itemName
|
||||
hotItem.localised_name = { "", { "item-name.hot" }, " ", { "item-name." .. itemName } }
|
||||
if (config.icons) then
|
||||
if config.icons then
|
||||
hotItem.icons = config.icons
|
||||
else
|
||||
hotItem.icon = iconFolder .. "hot-" .. itemName .. ".png"
|
||||
|
@ -27,6 +27,11 @@ function createHotVariant(config)
|
|||
hotItem.weight = item.weight
|
||||
hotItem.spoil_result = itemName
|
||||
hotItem.spoil_ticks = spoilTicks
|
||||
hotItem.flags = hotItem.flags or {}
|
||||
if not table.contains(hotItem.flags, "always-show") then
|
||||
table.insert(hotItem.flags, "always-show")
|
||||
end
|
||||
|
||||
data:extend({ hotItem })
|
||||
|
||||
item.hot_item = hotItem.name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue