From b39f614186499f344d23903ff0a2e28ce44948d7 Mon Sep 17 00:00:00 2001 From: Brevven Date: Fri, 14 Jan 2022 03:02:05 -0800 Subject: [PATCH] lds recipe nanotubes --- carbon-recipe-final-se.lua | 20 +++++++-------- carbon-recipe-updates.lua | 1 - carbon-recipe.lua | 50 -------------------------------------- changelog.txt | 5 ++++ data-final-fixes.lua | 38 +++++++++++++++++++++++++++++ info.json | 4 ++- 6 files changed, 56 insertions(+), 62 deletions(-) diff --git a/carbon-recipe-final-se.lua b/carbon-recipe-final-se.lua index f31a0dd..f48ab59 100644 --- a/carbon-recipe-final-se.lua +++ b/carbon-recipe-final-se.lua @@ -1,8 +1,8 @@ -local util = require("util") -local bzutil = require("__bzcarbon__.data-util"); +local futil = require("util") +local util = require("__bzcarbon__.data-util"); if mods["space-exploration"] then -if bzutil.me.use_fullerenes() then +if util.me.use_fullerenes() then -- Add an extra nanotube aeroframe scaffold recipe. -- This could be moved to data-updates in future if necessary data:extend({ @@ -19,13 +19,13 @@ if bzutil.me.use_fullerenes() then energy_required = 2, ingredients = { {"nanotubes", 2}, - table.unpack(util.table.deepcopy(data.raw.recipe["se-aeroframe-scaffold"].ingredients)), + table.unpack(futil.table.deepcopy(data.raw.recipe["se-aeroframe-scaffold"].ingredients)), }, result = "se-aeroframe-scaffold", result_count = 2, }, }) - bzutil.add_effect("se-aeroframe-scaffold", {type="unlock-recipe", recipe="aeroframe-scaffold-nanotubes"}) + util.add_effect("se-aeroframe-scaffold", {type="unlock-recipe", recipe="aeroframe-scaffold-nanotubes"}) data:extend({ { @@ -42,17 +42,17 @@ if bzutil.me.use_fullerenes() then energy_required = data.raw.recipe["se-nanomaterial"].energy_required, ingredients = { {"nanotubes", 2}, - table.unpack(util.table.deepcopy(data.raw.recipe["se-nanomaterial"].ingredients)), + table.unpack(futil.table.deepcopy(data.raw.recipe["se-nanomaterial"].ingredients)), }, results = { - table.unpack(util.table.deepcopy(data.raw.recipe["se-nanomaterial"].results)), + table.unpack(futil.table.deepcopy(data.raw.recipe["se-nanomaterial"].results)), } } }) - bzutil.add_to_product("nanomaterial-nanotubes", "se-nanomaterial", 16) - bzutil.add_effect("se-nanomaterial", {type="unlock-recipe", recipe="nanomaterial-nanotubes"}) + util.add_to_product("nanomaterial-nanotubes", "se-nanomaterial", 16) + util.add_effect("se-nanomaterial", {type="unlock-recipe", recipe="nanomaterial-nanotubes"}) -- core mining balancing - bzutil.add_to_product("se-core-fragment-omni", "graphite", -3) + util.add_to_product("se-core-fragment-omni", "graphite", -3) end end diff --git a/carbon-recipe-updates.lua b/carbon-recipe-updates.lua index 6237bb3..5192d6a 100644 --- a/carbon-recipe-updates.lua +++ b/carbon-recipe-updates.lua @@ -96,7 +96,6 @@ util.add_ingredient("low-density-structure", "diamond", 1) util.add_ingredient("se-low-density-structure-beryllium", "diamond", 1) if util.me.reuse() then util.add_product("low-density-structure", {type="item", name="diamond", amount=1, probability = 0.5}) - util.add_product("low-density-structure-nanotubes", {type="item", name="diamond", amount=1, probability = 0.5}) util.add_product("se-low-density-structure-beryllium", {type="item", name="diamond", amount=1, probability = 0.5}) end diff --git a/carbon-recipe.lua b/carbon-recipe.lua index 4469f2e..eafdcab 100644 --- a/carbon-recipe.lua +++ b/carbon-recipe.lua @@ -275,41 +275,6 @@ data:extend({ -- fullerenes if util.me.use_fullerenes() then -function lds_recipe() - if mods.bztitanium then - if mods.bzzirconium then - return { - {type="item", name=util.titanium_plate, amount=2}, - {type="item", name="nanotubes", amount=2}, - {type="item", name="plastic-bar", amount=2}, - {type="item", name="zirconia", amount=2}, - {type="item", name="diamond", amount=1}, - } - end - return { - {type="item", name=util.titanium_plate, amount=2}, - {type="item", name="nanotubes", amount=5}, - {type="item", name="plastic-bar", amount=5}, - {type="item", name="diamond", amount=1}, - } - elseif mods.bzzirconium then - return { - {type="item", name="zirconia", amount=5}, - {type="item", name="copper-plate", amount=5}, - {type="item", name="nanotubes", amount=5}, - {type="item", name="plastic-bar", amount=2}, - {type="item", name="diamond", amount=1}, - } - else - return { - {type="item", name="copper-plate", amount=10}, - {type="item", name="nanotubes", amount=5}, - {type="item", name="plastic-bar", amount=5}, - {type="item", name="diamond", amount=1}, - } - end -end - data:extend({ { type = "item", @@ -395,21 +360,6 @@ data:extend({ mods.Krastorio2 and {type="fluid", name="dirty-water", amount=1, catalyst_amount=1} or nil, }, }, - { - type = "recipe", - name = "low-density-structure-nanotubes", - icons = { - { icon = "__base__/graphics/icons/low-density-structure.png", icon_size = 64, icon_mipmaps = 4}, - { icon = "__bzcarbon__/graphics/icons/nanotube.png", icon_size = 128, scale=0.125, shift= {-8, -8}}, - }, - category = "advanced-crafting", - subgroup = data.raw.item["low-density-structure"].subgroup, - order = "o[low-density-structure-nanotubes]", - enabled = false, - energy_required = 20, - ingredients = lds_recipe(), - results = {{"low-density-structure", 1}}, - }, { type = "technology", name = "nanotubes", diff --git a/changelog.txt b/changelog.txt index 04c75ad..3df2d68 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 0.0.16 +Date: 2022-01-14 + Changes: + - LDS Nanotube recipe now uses 2xN pattern. +--------------------------------------------------------------------------------------------------- Version: 0.0.15 Date: 2022-01-13 Features: diff --git a/data-final-fixes.lua b/data-final-fixes.lua index 9eea18d..fb17d0d 100644 --- a/data-final-fixes.lua +++ b/data-final-fixes.lua @@ -5,6 +5,7 @@ require("carbon-recipe-final-rrr") require("carbon-recipe-modules") -- Should be last import local util = require("data-util"); +local futil = require("util") -- Green circuits in final fixes due to K2 shenanigans @@ -31,6 +32,43 @@ if data.raw.recipe["low-density-structure"] and }) end +if util.me.use_fullerenes() then + data:extend({ + { + type = "recipe", + name = "low-density-structure-nanotubes", + icons = { + { icon = "__base__/graphics/icons/low-density-structure.png", icon_size = 64, icon_mipmaps = 4}, + { icon = "__bzcarbon__/graphics/icons/nanotube.png", icon_size = 128, scale=0.125, shift= {-8, -8}}, + }, + category = "advanced-crafting", + subgroup = data.raw.item["low-density-structure"].subgroup, + order = "o[low-density-structure-nanotubes]", + normal = { + enabled = false, + energy_required = 20, + results = {{"low-density-structure", 2}}, + ingredients = { + {"nanotubes", 2}, + table.unpack(futil.table.deepcopy(data.raw.recipe["low-density-structure"].normal.ingredients)), + }, + }, + expensive = { + enabled = false, + energy_required = 20, + results = {{"low-density-structure", 2}}, + ingredients = { + {"nanotubes", 2}, + table.unpack(futil.table.deepcopy(data.raw.recipe["low-density-structure"].expensive.ingredients)), + }, + }, + }, + }) + if util.me.reuse() then + util.add_product("low-density-structure-nanotubes", {type="item", name="diamond", amount=1, probability = 0.5}) + end +end + -- Only electric smelters can make Diamonds function diamondsInElectricSmelter(entity) diff --git a/info.json b/info.json index 693bab2..a9de08e 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bzcarbon", - "version": "0.0.15", + "version": "0.0.16", "factorio_version": "1.1", "title": "Graphite & Diamonds", "author": "Brevven", @@ -8,6 +8,8 @@ "homepage": "", "dependencies": [ "base >= 1.1.0", + "? bztitanium", + "? bzzirconium", "? space-exploration", "? aai-industry", "? Krastorio2",