diff --git a/carbon-recipe-updates.lua b/carbon-recipe-updates.lua index 46269d3..6237bb3 100644 --- a/carbon-recipe-updates.lua +++ b/carbon-recipe-updates.lua @@ -89,10 +89,16 @@ else util.add_ingredient("effectivity-module-2", "diamond", 1) util.add_ingredient("productivity-module-2", "diamond", 1) end +util.add_ingredient("laser-turret", "diamond", 1) util.add_ingredient("assembling-machine-3", "diamond", 4) + util.add_ingredient("low-density-structure", "diamond", 1) util.add_ingredient("se-low-density-structure-beryllium", "diamond", 1) -util.add_ingredient("laser-turret", "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 if mods.Krastorio2 then util.replace_some_ingredient("steel-plate", "iron-plate", 2, "graphite", 4) diff --git a/carbon-recipe.lua b/carbon-recipe.lua index 70fb803..4469f2e 100644 --- a/carbon-recipe.lua +++ b/carbon-recipe.lua @@ -403,12 +403,12 @@ data:extend({ { 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(), - result = "low-density-structure", - result_count = 1, + results = {{"low-density-structure", 1}}, }, { type = "technology", @@ -461,8 +461,7 @@ data:extend({ type = "item", name = "carbon-black", icon = "__bzcarbon__/graphics/icons/carbon-black.png", - icon_size = 64, - icon_mipmaps = 3, + icon_size = 64, icon_mipmaps = 3, subgroup = "intermediate-product", order = "g[graphite-carbon-black]", stack_size = util.get_stack_size(100), @@ -470,6 +469,8 @@ data:extend({ { type = "recipe", name = "carbon-black", + icon = "__bzcarbon__/graphics/icons/carbon-black.png", + icon_size = 64, icon_mipmaps = 3, category = "chemistry", order = "d[graphite-carbon-black]", enabled = false, @@ -477,8 +478,9 @@ data:extend({ ingredients = { {type="item", name="coal", amount=1}, }, - result = "carbon-black", - result_count = 1, + results = { + {type="item", name= "carbon-black", amount=1}, + } }, { type = "recipe", @@ -500,6 +502,7 @@ data:extend({ }) end +-- crucible data:extend({ { type = "item", diff --git a/changelog.txt b/changelog.txt index 064a33a..04c75ad 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 0.0.15 +Date: 2022-01-13 + Features: + - Setting to enable reusing diamond grinding grit for LDS recipes +--------------------------------------------------------------------------------------------------- Version: 0.0.14 Date: 2022-01-12 Changes: diff --git a/data-final-fixes.lua b/data-final-fixes.lua index dc93298..9eea18d 100644 --- a/data-final-fixes.lua +++ b/data-final-fixes.lua @@ -8,7 +8,6 @@ local util = require("data-util"); -- Green circuits in final fixes due to K2 shenanigans - if not mods.MDbobelectronics then util.replace_some_ingredient("electronic-circuit", "copper-cable", 1, "graphite", 1) -- AAI alternate green circuit @@ -18,6 +17,20 @@ else util.replace_ingredient("basic-electronic-component", "coke", "graphite") end +if data.raw.recipe["low-density-structure"] and + not data.raw.recipe["low-density-structure"].icon and + not data.raw.recipe["low-density-structure"].icons + then + util.set_subgroup("low-density-structure", data.raw.item["low-density-structure"].subgroup) + util.set_icons("low-density-structure", { + { icon = "__base__/graphics/icons/low-density-structure.png", icon_size = 64, icon_mipmaps = 4}, + }) + util.set_subgroup("se-low-density-structure-beryllium", data.raw.item["low-density-structure"].subgroup) + util.set_icons("se-low-density-structure-beryllium", { + { icon = "__base__/graphics/icons/low-density-structure.png", icon_size = 64, icon_mipmaps = 4}, + }) +end + -- Only electric smelters can make Diamonds function diamondsInElectricSmelter(entity) @@ -47,6 +60,7 @@ for i, furnace in pairs(util.me.furnaces) do end end +-- Vanilla burner phase tweaks -- green circuits after electronics if not mods.Krastorio2 and not mods["aai-industry"] then util.replace_ingredient("offshore-pump", "electronic-circuit", "copper-cable") util.replace_ingredient("lab", "electronic-circuit", "copper-cable") diff --git a/graphics/icons/nanotube.xcf b/graphics/icons/nanotube.xcf index 090b9be..0697e68 100644 Binary files a/graphics/icons/nanotube.xcf and b/graphics/icons/nanotube.xcf differ diff --git a/info.json b/info.json index 02e4823..693bab2 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bzcarbon", - "version": "0.0.14", + "version": "0.0.15", "factorio_version": "1.1", "title": "Graphite & Diamonds", "author": "Brevven", diff --git a/locale/en/carbon.cfg b/locale/en/carbon.cfg index 11d6a34..941fd24 100644 --- a/locale/en/carbon.cfg +++ b/locale/en/carbon.cfg @@ -65,6 +65,7 @@ bzcarbon-list=Make a list of modified recipes bzcarbon-enable-fullerenes=Enable fullerenes & nanotubes bzcarbon-enable-carbon-black=Enable carbon black bzcarbon-enable-rough-diamond=Enable diamond mining +bzcarbon-reuse=Reuse grinding grit [mod-setting-description] bzcarbon-recipe-bypass=Skip modifying these recipes (comma-separated list). @@ -72,3 +73,4 @@ bzcarbon-list=If enabled, the text command [color=orange]BZList[/color] will dum bzcarbon-enable-fullerenes=Enable the fullerenes & nanotubes intermediate products.\nFullerenes are used primarily in bio-related things. Nanotubes for structures. bzcarbon-enable-carbon-black=Enable carbon black byproduct. Primarily used to make plastics. bzcarbon-enable-rough-diamond=Enables diamond ore patches for new games. +bzcarbon-reuse=A chance to reuse diamond grinding grit in recipes like LDS. More complex, but saves resources. diff --git a/me.lua b/me.lua index 33cbd14..8d8d641 100644 --- a/me.lua +++ b/me.lua @@ -7,6 +7,11 @@ function me.use_fullerenes() return me.get_setting("bzcarbon-enable-fullerenes") == "yes" end +function me.reuse() + return me.get_setting("bzcarbon-reuse") == "yes" +end + + function me.use_carbon_black() return me.get_setting("bzcarbon-enable-carbon-black") == "yes" end diff --git a/settings.lua b/settings.lua index 26e42f1..ea921e1 100644 --- a/settings.lua +++ b/settings.lua @@ -33,4 +33,11 @@ data:extend({ setting_type = "startup", default_value = false, }, + { + type = "string-setting", + name = "bzcarbon-reuse", + setting_type = "startup", + default_value = "no", + allowed_values = {"no", "yes"}, + }, }) diff --git a/thumbnail.xcf b/thumbnail.xcf index 9b15648..0609aee 100644 Binary files a/thumbnail.xcf and b/thumbnail.xcf differ