diff --git a/carbon-recipe-updates.lua b/carbon-recipe-updates.lua index d1a72af..00c9aab 100644 --- a/carbon-recipe-updates.lua +++ b/carbon-recipe-updates.lua @@ -7,6 +7,9 @@ util.add_prerequisite("low-density-structure", "diamond-processing") util.add_prerequisite("advanced-electronics-2", "diamond-processing") util.add_prerequisite("laser", "diamond-processing") +-- update carbon black alternate recipe if possible +util.replace_ingredient("carbon-black", "coal", "crushed-coal") + if not mods["space-age"] then -- more uses for graphene in vanilla util.add_prerequisite("power-armor-mk2", "graphene") @@ -40,6 +43,7 @@ end -- space age if mods["space-age"] then + util.add_ingredient("crusher", "diamond", 10) util.add_ingredient("big-mining-drill", "diamond", 10) util.add_prerequisite("big-mining-drill", "diamond-processing-2") util.replace_ingredient("quantum-processor", "tungsten-carbide", "diamond", 2) @@ -51,6 +55,11 @@ if mods["space-age"] then util.set_product_probability("scrap-recycling", "processing-unit", 0.03) util.add_ingredient("cryogenic-plant", "graphene", 20) util.add_ingredient("fluoroketone", "graphene", 1) + + -- Crushing industries + util.add_ingredient("crusher-2", "diamond", 10) + util.add_ingredient("big-crusher", "diamond", 10) + util.add_ingredient("big-electric-crusher", "diamond", 10) end -- fullerenes & nanotubes diff --git a/changelog.txt b/changelog.txt index 486eee5..99d818d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,8 +1,12 @@ --------------------------------------------------------------------------------------------------- Version: 2.0.14 -Date: 2025-03-23 +Date: 2025-04-08 Changes: - - none + - Space Age: Crusher recipe requires diamonds. + - Carbon black recipe uses crushed coal if available + - Further improved compatibility with Crushing Industry recipes + - Space Age: Asteroid crushing recipe now affected by productivity research + - Space Age: Low Density Structure recipes now affected by productivity reseearch --------------------------------------------------------------------------------------------------- Version: 2.0.13 Date: 2025-03-22 diff --git a/data-util.lua b/data-util.lua index 2ab06b4..f121833 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 diff --git a/info.json b/info.json index e2ce61b..9ae6537 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bzcarbon", - "version": "2.0.13", + "version": "2.0.14", "factorio_version": "2.0", "title": "Graphite & Diamonds", "author": "Brevven", diff --git a/nanotubes-final.lua b/nanotubes-final.lua index 21561f3..db2e671 100644 --- a/nanotubes-final.lua +++ b/nanotubes-final.lua @@ -6,4 +6,8 @@ if util.me.use_fullerenes() then cutil.nanotube_recipe("casting-low-density-structure", "low-density-structure") cutil.nanotube_recipe("space-platform-foundation") cutil.nanotube_recipe("low-density-structure-from-aluminum", "low-density-structure") + + util.add_to_productivity_research("low-density-structure-productivity", "low-density-structure-nanotubes") + util.add_to_productivity_research("low-density-structure-productivity", "casting-low-density-structure-nanotubes") + util.add_to_productivity_research("low-density-structure-productivity", "low-density-structure-from-aluminum-nanotubes") end diff --git a/prototypes/basic-crusher.lua b/prototypes/basic-crusher.lua index a445ff4..c734739 100644 --- a/prototypes/basic-crusher.lua +++ b/prototypes/basic-crusher.lua @@ -4,7 +4,7 @@ local item_sounds = require("__base__.prototypes.item_sounds") local sounds = require("__base__.prototypes.entity.sounds") local hit_effects = require("__base__.prototypes.entity.hit-effects") -if mods["space-age"] and not data.raw.furnace["basic-crusher"] then +if mods["space-age"] and not data.raw.furnace["basic-crusher"] and not mods["crushing-industry"] then -- note that crusher is a space age asset and as such can only be used with space age local graphics = require("__space-age__.prototypes.entity.crusher-pictures") diff --git a/prototypes/carbon-asteroid-updates.lua b/prototypes/carbon-asteroid-updates.lua index d6cb030..866b6bb 100644 --- a/prototypes/carbon-asteroid-updates.lua +++ b/prototypes/carbon-asteroid-updates.lua @@ -38,4 +38,5 @@ if mods["space-age"] then }, }) util.add_unlock("space-platform-thruster", "alternative-carbonic-asteroid-crushing") + util.add_to_productivity_research("asteroid-productivity", "alternative-carbonic-asteroid-crushing") end