From 3c0ebc98e2458164fd03d6392730a36ff3ee1275 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Tue, 15 Apr 2025 18:04:59 +0200 Subject: [PATCH 1/7] Add polish translation --- hot-metals/locale/pl/strings.cfg | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 hot-metals/locale/pl/strings.cfg diff --git a/hot-metals/locale/pl/strings.cfg b/hot-metals/locale/pl/strings.cfg new file mode 100644 index 0000000..01c6fa9 --- /dev/null +++ b/hot-metals/locale/pl/strings.cfg @@ -0,0 +1,12 @@ +[item-name] +hot=Hot + +[mod-setting-name] +hot-metals-time=Czas stygnięcia +hot-metals-plastic=Dodaj gorący plastik +hot-metals-bricks=dodaj gorące kamienne cegły i beton + +[mod-setting-description] +hot-metals-time=Czas w sekundach, jaki jest potrzebny, aby gorący przedmiot ostygł. +hot-metals-plastic=Chociaż temperatura gorącego plastiku jest znacznie niższa w porównaniu do metali, możesz chcieć mieć jego gorącą wersję. +hot-metals-bricks=Kamienne cegły i beton nie są domyślnie uwzględnione. Jeśli lubisz grać z gorącymi wariantami, możesz włączyć tę opcję. \ No newline at end of file From 1adf84ef1a4fecce82d352272421b2d0adb95a7a Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Tue, 15 Apr 2025 18:08:54 +0200 Subject: [PATCH 2/7] Move technology changes to final fixes stage --- hot-metals/data-final-fixes.lua | 1 + hot-metals/prototypes/hot-metals-final.lua | 9 +++++++++ hot-metals/prototypes/hot-metals.lua | 9 ++------- 3 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 hot-metals/data-final-fixes.lua create mode 100644 hot-metals/prototypes/hot-metals-final.lua diff --git a/hot-metals/data-final-fixes.lua b/hot-metals/data-final-fixes.lua new file mode 100644 index 0000000..5a61b06 --- /dev/null +++ b/hot-metals/data-final-fixes.lua @@ -0,0 +1 @@ +require("prototypes/hot-metals-final") \ No newline at end of file diff --git a/hot-metals/prototypes/hot-metals-final.lua b/hot-metals/prototypes/hot-metals-final.lua new file mode 100644 index 0000000..7b42417 --- /dev/null +++ b/hot-metals/prototypes/hot-metals-final.lua @@ -0,0 +1,9 @@ +-- Change technology triggers +for _, tech in pairs(data.raw.technology) do + if tech.research_trigger then + local item = data.raw.item[tech.research_trigger.item] + if item and item.hot_item and not contains(HotMetals.skipTechUnlocksFor, item.name) then + tech.research_trigger.item = item.hot_item + end + end +end \ No newline at end of file diff --git a/hot-metals/prototypes/hot-metals.lua b/hot-metals/prototypes/hot-metals.lua index d6ab1a1..03e55e3 100644 --- a/hot-metals/prototypes/hot-metals.lua +++ b/hot-metals/prototypes/hot-metals.lua @@ -76,6 +76,8 @@ function createHotVariant(config) hotItem.spoil_ticks = spoilTicks data:extend({ hotItem }) + item.hot_item = hotItem.name + -- Change recipes for _, recipe in pairs(data.raw.recipe) do if contains(HotMetals.craftingCategories, recipe.category) then @@ -101,13 +103,6 @@ function createHotVariant(config) end end end - - -- Change technology triggers - for _, tech in pairs(data.raw.technology) do - if tech.research_trigger and tech.research_trigger.item == itemName and not contains(HotMetals.skipTechUnlocksFor, itemName) then - tech.research_trigger.item = hotItem.name - end - end end -- Checks if a table contains a certain value From 215dd76d90a13f09781fbc410697bfe0167f85ce Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Fri, 18 Apr 2025 10:41:15 +0200 Subject: [PATCH 3/7] 1.2.6 --- hot-metals/changelog.txt | 6 ++++++ hot-metals/info.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hot-metals/changelog.txt b/hot-metals/changelog.txt index 8816037..0812e56 100644 --- a/hot-metals/changelog.txt +++ b/hot-metals/changelog.txt @@ -1,4 +1,10 @@ --------------------------------------------------------------------------------------------------- +Version: 1.2.6 +Date: 18.04.2025 + Changes: + - Add polish translation (I forgot who did it :-( ) + - Move technology changes to final fixes stage +--------------------------------------------------------------------------------------------------- Version: 1.2.5 Date: 04.02.2025 Changes: diff --git a/hot-metals/info.json b/hot-metals/info.json index 1678653..3f19979 100644 --- a/hot-metals/info.json +++ b/hot-metals/info.json @@ -1,6 +1,6 @@ { "name": "hot-metals", - "version": "1.2.5", + "version": "1.2.6", "title": "Hot metals", "description": "A furnace doesn't just output cold usable results. You need to wait for them to cool down.", "author": "cackling fiend", From ff57a879143994d97312ad453dd5dac90a01849a Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Fri, 22 Aug 2025 03:03:18 +0200 Subject: [PATCH 4/7] Simplify weight calculation to prevent infinite recursion --- hot-metals/prototypes/hot-metals.lua | 49 +--------------------------- 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/hot-metals/prototypes/hot-metals.lua b/hot-metals/prototypes/hot-metals.lua index 03e55e3..e072372 100644 --- a/hot-metals/prototypes/hot-metals.lua +++ b/hot-metals/prototypes/hot-metals.lua @@ -1,52 +1,5 @@ local defaultSpoilTicks = settings.startup["hot-metals-time"].value * 60 ----@param name data.ItemID ----@return data.ItemPrototype? -function getItem(name) - if data.raw.item[name] then - return data.raw.item[name] --[[@as data.ItemPrototype]] - end - for item_type in pairs(defines.prototypes.item) do - local type_lookup = data.raw[item_type] - if type_lookup and type_lookup[name] then - return type_lookup[name] --[[@as data.ItemPrototype]] - end - end -end - ----@param table item ----@return number -function getWeight(item) - if type(item) == "string" then - item = getItem(item) - end - if item.weight then return item.weight end - local factor = item.ingredient_to_weight_coefficient or 0.5 - for _, recipe in pairs(data.raw.recipe) do - if recipe.results == nil then - goto continue - end - local function isResultMatch(result) - return result.name == item.name - end - local results = table.filter(recipe.results, isResultMatch) - if #results > 0 then - for _, ingredient in pairs(recipe.ingredients) do - if ingredient.type == "item" then - local weight = data.raw.item[ingredient.name].weight or getWeight(data.raw.item[ingredient.name]) - local amount = ingredient.amount - if ingredient.amount_min and ingredient.amount_max then - amount = (ingredient.amount_min + ingredient.amount_max) / 2 - end - return amount * weight * factor - end - end - end - ::continue:: - end - return 100 -end - function createHotVariant(config) local itemName = config local spoilTicks = defaultSpoilTicks @@ -58,7 +11,7 @@ function createHotVariant(config) iconFolder = config.iconFolder or iconFolder end local item = data.raw.item[itemName] - item.weight = getWeight(item) + item.weight = item.weight or 10000 -- Create new item local hotItem = table.deepcopy(data.raw.item[itemName]) From 407068968cb0dd898687c16b57d07fc9c9dbdc81 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Fri, 22 Aug 2025 03:24:03 +0200 Subject: [PATCH 5/7] 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 From 2a9cc689f97b18f4d0d5b7372bb89b392a925b42 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Fri, 22 Aug 2025 03:27:45 +0200 Subject: [PATCH 6/7] 1.2.7 --- hot-metals/changelog.txt | 6 ++++++ hot-metals/info.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hot-metals/changelog.txt b/hot-metals/changelog.txt index 0812e56..aa6ba0b 100644 --- a/hot-metals/changelog.txt +++ b/hot-metals/changelog.txt @@ -1,4 +1,10 @@ --------------------------------------------------------------------------------------------------- +Version: 1.2.7 +Date: 22.08.2025 + Bug Fixes: + - Simplify weight calculation to prevent infinite recursion (https://mods.factorio.com/mod/hot-metals/discussion/68a3a137a86e2ca3d73388fe) + - Always show hot variants in filter menus (https://mods.factorio.com/mod/hot-metals/discussion/685ac28c1436373189fc0bff) +--------------------------------------------------------------------------------------------------- Version: 1.2.6 Date: 18.04.2025 Changes: diff --git a/hot-metals/info.json b/hot-metals/info.json index 3f19979..4043cb9 100644 --- a/hot-metals/info.json +++ b/hot-metals/info.json @@ -1,6 +1,6 @@ { "name": "hot-metals", - "version": "1.2.6", + "version": "1.2.7", "title": "Hot metals", "description": "A furnace doesn't just output cold usable results. You need to wait for them to cool down.", "author": "cackling fiend", From 7f5fd5705d6cb2f62036d520bd1116989ecc393a Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Mon, 15 Sep 2025 18:13:40 +0200 Subject: [PATCH 7/7] Update Discord link --- hot-metals/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hot-metals/info.json b/hot-metals/info.json index 4043cb9..b1fbb89 100644 --- a/hot-metals/info.json +++ b/hot-metals/info.json @@ -4,7 +4,7 @@ "title": "Hot metals", "description": "A furnace doesn't just output cold usable results. You need to wait for them to cool down.", "author": "cackling fiend", - "homepage": "", + "homepage": "https://discord.gg/ufvFUJtVwk", "factorio_version": "2.0", "dependencies": [ "base",