From afa282a5560c35b07b78ddd47dc11a65dc21b24b Mon Sep 17 00:00:00 2001 From: Brevven Date: Mon, 31 May 2021 14:19:36 -0700 Subject: [PATCH] furnaces --- changelog.txt | 5 +++++ info.json | 2 +- lead-recipe-updates.lua | 8 ++++++++ util.lua | 4 ---- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/changelog.txt b/changelog.txt index d555157..3a88369 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 0.4.6 +Date: 2021-05-23 + Features: + - Nuclear furnace, mega furnace compat +--------------------------------------------------------------------------------------------------- Version: 0.4.5 Date: 2021-05-22 Fixes: diff --git a/info.json b/info.json index 9cd782f..c70065f 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bzlead", - "version": "0.4.5", + "version": "0.4.6", "factorio_version": "1.1", "title": "Lead", "author": "Brevven", diff --git a/lead-recipe-updates.lua b/lead-recipe-updates.lua index 93f28c0..3c807ef 100644 --- a/lead-recipe-updates.lua +++ b/lead-recipe-updates.lua @@ -98,3 +98,11 @@ util.add_ingredient("kr-heavy-machine-gun-turret", "lead-plate", 10) -- Geothermal util.add_ingredient("geothermal-well", "lead-plate", 120) +-- Nuclear furnace +util.add_ingredient("nuclear-furnace-1", "lead-plate", 200) +util.add_ingredient("nuclear-furnace-2", "lead-plate", 200) + +-- Mega furnace +util.add_ingredient("mega-furnace", "lead-plate", 5) + + diff --git a/util.lua b/util.lua index 8963656..e03b3d9 100644 --- a/util.lua +++ b/util.lua @@ -75,9 +75,7 @@ end function replace_ingredient(recipe, old, new) if recipe ~= nil and recipe.ingredients ~= nil then for i, ingredient in pairs(recipe.ingredients) do - -- For final fixes if ingredient.name == old then ingredient.name = new end - -- For updates if ingredient[1] == old then ingredient[1] = new end end end @@ -120,11 +118,9 @@ end function replace_some_ingredient(recipe, old, new, amount) if recipe ~= nil and recipe.ingredients ~= nil then for i, ingredient in pairs(recipe.ingredients) do - -- For final fixes if ingredient.name == old then ingredient.amount = math.max(1, ingredient.amount - amount) end - -- For updates if ingredient[1] == old then ingredient[2] = math.max(1, ingredient[2] - amount) end