From f31f6c1785e8cf7fccc4e60040b4f0943bdf3ee2 Mon Sep 17 00:00:00 2001 From: Adamo Date: Mon, 22 Jun 2020 09:41:12 -0400 Subject: [PATCH] Added some settings and a new trolling recipe function that I still need to finish. --- changelog.txt | 9 ++++ data-updates.lua | 101 +++++++++++++++++++++++---------------------- locale/en/base.cfg | 8 ++++ 3 files changed, 68 insertions(+), 50 deletions(-) diff --git a/changelog.txt b/changelog.txt index 21a2e96..797a107 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,12 @@ +--------------------------------------------------------------------------------------------------- +Version: 0.2.0 +Date: 2020-06-22 + + Changes: + - Added algorithm to replace vanilla uranium items with Adamo + Nuclear uranium items. + - Added boolean settings for recipe overrides. + --------------------------------------------------------------------------------------------------- Version: 0.1.3 Date: 2020-02-04 diff --git a/data-updates.lua b/data-updates.lua index 8dc9917..129f710 100644 --- a/data-updates.lua +++ b/data-updates.lua @@ -13,13 +13,11 @@ replace_recipe_io( ) if appmod and type(appmod) == "table" then - appmod - .blacklist["centrifuge"] = true + appmod.blacklist["centrifuge"] = true end if appmod and type(appmod) == "table" then - appmod - .blacklist["adamo-nuclear-production-reactor"] = true + appmod.blacklist["adamo-nuclear-production-reactor"] = true end data.raw.item["centrifuge"].subgroup = "adamo-nuclear-production-machine" @@ -170,52 +168,55 @@ atomic_bomb.icon = "__adamo-nuclear__/graphics/icons/fission-rocket.png" atomic_bomb.icon_size = 32 -if data.raw.recipe["uranium-transport-belt"] then - data.raw.recipe["uranium-transport-belt"].normal.energy_required = 50 - data.raw.recipe["uranium-transport-belt"].normal.ingredients = - { - {"iron-gear-wheel", 500}, - {"express-transport-belt", 100}, - {"adamo-nuclear-Pu238-oxide",1}, - {type="fluid", name="lubricant", amount=1000}, - {type="item", name="electric-engine-unit", amount=100} - } - data.raw.recipe["uranium-transport-belt"].expensive.energy_required = 50 - data.raw.recipe["uranium-transport-belt"].expensive.ingredients = - { - {"iron-gear-wheel", 1000}, - {"express-transport-belt", 100}, - {"adamo-nuclear-Pu238-oxide",1}, - {type="fluid", name="lubricant", amount=2000}, - {type="item", name="electric-engine-unit", amount=100} - } - data.raw.recipe["uranium-transport-belt"].normal.result_count = 100 - data.raw.recipe["uranium-transport-belt"].expensive.result_count = 100 -end -if data.raw.recipe["uranium-underground-belt"] then - data.raw.recipe["uranium-underground-belt"].energy_required = 100 - data.raw.recipe["uranium-underground-belt"].ingredients = - { - {"iron-gear-wheel", 2000}, - {"express-underground-belt",100}, - {"adamo-nuclear-Pu238-oxide",1}, - {type="fluid", name="lubricant", amount=1000}, - {type="item", name="electric-engine-unit", amount=100} - } - data.raw.recipe["uranium-underground-belt"].result_count = 100 -end -if data.raw.recipe["uranium-splitter"] then - data.raw.recipe["uranium-splitter"].energy_required = 200 - data.raw.recipe["uranium-splitter"].ingredients = - { - {"express-splitter", 100}, - {"iron-gear-wheel", 1000}, - {"processing-unit", 100}, - {"adamo-nuclear-Pu238-oxide",1}, - {type="fluid", name="lubricant", amount=1000}, - {type="item", name="electric-engine-unit", amount=100} - } - data.raw.recipe["uranium-splitter"].result_count = 100 + +if settings.startup["adamo-nuclear-uranium-belt-recipe-override"].value then + if data.raw.recipe["uranium-transport-belt"] then + data.raw.recipe["uranium-transport-belt"].normal.energy_required = 50 + data.raw.recipe["uranium-transport-belt"].normal.ingredients = + { + {"iron-gear-wheel", 500}, + {"express-transport-belt", 100}, + {"adamo-nuclear-Pu238-oxide",1}, + {type="fluid", name="lubricant", amount=1000}, + {type="item", name="electric-engine-unit", amount=100} + } + data.raw.recipe["uranium-transport-belt"].expensive.energy_required = 50 + data.raw.recipe["uranium-transport-belt"].expensive.ingredients = + { + {"iron-gear-wheel", 1000}, + {"express-transport-belt", 100}, + {"adamo-nuclear-Pu238-oxide",1}, + {type="fluid", name="lubricant", amount=2000}, + {type="item", name="electric-engine-unit", amount=100} + } + data.raw.recipe["uranium-transport-belt"].normal.result_count = 100 + data.raw.recipe["uranium-transport-belt"].expensive.result_count = 100 + end + if data.raw.recipe["uranium-underground-belt"] then + data.raw.recipe["uranium-underground-belt"].energy_required = 100 + data.raw.recipe["uranium-underground-belt"].ingredients = + { + {"iron-gear-wheel", 2000}, + {"express-underground-belt",100}, + {"adamo-nuclear-Pu238-oxide",1}, + {type="fluid", name="lubricant", amount=1000}, + {type="item", name="electric-engine-unit", amount=100} + } + data.raw.recipe["uranium-underground-belt"].result_count = 100 + end + if data.raw.recipe["uranium-splitter"] then + data.raw.recipe["uranium-splitter"].energy_required = 200 + data.raw.recipe["uranium-splitter"].ingredients = + { + {"express-splitter", 100}, + {"iron-gear-wheel", 1000}, + {"processing-unit", 100}, + {"adamo-nuclear-Pu238-oxide",1}, + {type="fluid", name="lubricant", amount=1000}, + {type="item", name="electric-engine-unit", amount=100} + } + data.raw.recipe["uranium-splitter"].result_count = 100 + end end reactor_item.icon = diff --git a/locale/en/base.cfg b/locale/en/base.cfg index b1eef22..fd4d780 100644 --- a/locale/en/base.cfg +++ b/locale/en/base.cfg @@ -97,3 +97,11 @@ centrifuge=Sorts isotopes by mass. nuclear-reactor=Reacts by a fast neutron spectrum. adamo-nuclear-thermal-reactor=Reacts by a moderated neutron spectrum. adamo-nuclear-production-reactor=Sorts and irradiates material using a pool reactor. Has a water-based particle accelerator. + +[mod-setting-name] +adamo-nuclear-recipe-trolling=Replace vanilla uranium in recipes. +adamo-nuclear-uranium-belt-recipe-override=Override uranium belt recipes. + +[mod-setting-description] +adamo-nuclear-recipe-trolling=Search all recipes, replacing vanilla uranium ingredients and results with equivalent Adamo Nuclear materials. +adamo-nuclear-uranium-belt-recipe-override=Alter ingredients in uranium belt recipes to be consistent with nuclear materials calculations. \ No newline at end of file