From e389779cc4956a3b951e13bd7bb19f02aa64f0fb Mon Sep 17 00:00:00 2001 From: Brevven Date: Sun, 9 Feb 2025 20:47:56 -0800 Subject: [PATCH] compat --- changelog.txt | 5 +++++ data-final-fixes.lua | 4 ++++ data-util.lua | 7 ++++++- info.json | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 98904f3..258fced 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 2.1.6 +Date: 2025-02-10 + Changes: + - Compatibility with Probablistic Agriculture +--------------------------------------------------------------------------------------------------- Version: 2.1.5 Date: 2025-02-01 Changes: diff --git a/data-final-fixes.lua b/data-final-fixes.lua index 86732bd..20fcaec 100644 --- a/data-final-fixes.lua +++ b/data-final-fixes.lua @@ -4,6 +4,8 @@ require("tin-recipe-final-rrr") local util = require("data-util"); +util.add_product("jellynut-processing", util.item("jellyskin", 1, .25)) -- in case of clobbering + util.replace_some_ingredient("se-glass-vulcanite", "sand", 1, "tin-plate", 1) util.add_product("se-glass-vulcanite", {type="item", name="tin-plate", amount=1, catalyst_amount=1, probability=0.8}) util.set_main_product("se-glass-vulcanite", "glass") @@ -41,5 +43,7 @@ util.size_recycler_output() util.redo_recycling() require("alloy-separation") -- should be after final redo_recycling + + -- Must be last util.create_list() diff --git a/data-util.lua b/data-util.lua index 0560a31..f658475 100644 --- a/data-util.lua +++ b/data-util.lua @@ -928,7 +928,12 @@ function add_product(recipe, product) if recipe ~= nil then if product.name and data.raw[product.type][product.name] then if recipe.results == nil then - recipe.results = {{recipe.result, recipe.result_count and recipe.result_count or 1}} + recipe.results = {} + end + for _, old in pairs(recipe.results) do + if old.name == product.name then + return + end end recipe.result = nil recipe.result_count = nil diff --git a/info.json b/info.json index 31a10f9..fb822e5 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bztin", - "version": "2.1.5", + "version": "2.1.6", "factorio_version": "2.0", "title": "Tin", "author": "Brevven",