From 407068968cb0dd898687c16b57d07fc9c9dbdc81 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Fri, 22 Aug 2025 03:24:03 +0200 Subject: [PATCH] Always show hot variants in filter menus --- hot-metals/prototypes/hot-metals.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hot-metals/prototypes/hot-metals.lua b/hot-metals/prototypes/hot-metals.lua index e072372..4c7bec5 100644 --- a/hot-metals/prototypes/hot-metals.lua +++ b/hot-metals/prototypes/hot-metals.lua @@ -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