From 1f3fe9cbb87cb207c5482af0dc315944d9d69f36 Mon Sep 17 00:00:00 2001 From: Brevven Date: Sat, 3 May 2025 03:10:37 -0700 Subject: [PATCH] fix bob issue --- changelog.txt | 5 +++++ data-util.lua | 13 +++++++++++-- info.json | 2 +- titanium-recipe.lua | 2 +- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index af1c0c2..1f690a9 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 2.0.23 +Date: 2025-05-03 + Fixes: + - Fix load issue with Bob's +--------------------------------------------------------------------------------------------------- Version: 2.0.22 Date: 2025-03-10 Changes: diff --git a/data-util.lua b/data-util.lua index 2ab06b4..0e48dbf 100644 --- a/data-util.lua +++ b/data-util.lua @@ -754,8 +754,17 @@ function util.add_effect(technology_name, effect) if not data.raw.recipe[effect.recipe] then return end - table.insert(technology.effects, effect) end + table.insert(technology.effects, effect) + end +end + +-- Make a technology boost productivity for a recipe +function util.add_to_productivity_research(technology_name, recipe_name, amount) + if not amount then amount = 0.1 end + local recipe = data.raw.recipe[recipe_name] + if recipe then + util.add_effect(technology_name, { type = "change-recipe-productivity", recipe = recipe_name, change = amount}) end end @@ -1321,7 +1330,7 @@ end -- Replace one product with another in a recipe function util.replace_product(recipe_name, old, new, options) if not should_force(options) and bypass(recipe_name) then return end - if data.raw.recipe[recipe_name] then + if data.raw.recipe[recipe_name] and (data.raw.item[new] or data.raw.fluid[new]) then replace_product(data.raw.recipe[recipe_name], old, new, options) end end diff --git a/info.json b/info.json index ad78463..f3f2de5 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bztitanium", - "version": "2.0.22", + "version": "2.0.23", "factorio_version": "2.0", "title": "Titanium", "author": "Brevven", diff --git a/titanium-recipe.lua b/titanium-recipe.lua index 62b16f0..18fdd11 100644 --- a/titanium-recipe.lua +++ b/titanium-recipe.lua @@ -100,7 +100,6 @@ data:extend({ -- } -- } or nil, }) -end if mods["space-age"] then util.add_vacuum() data:extend({ @@ -202,3 +201,4 @@ data:extend({ }, }) end +end