diff --git a/carbon-matter.lua b/carbon-matter.lua new file mode 100644 index 0000000..709fb27 --- /dev/null +++ b/carbon-matter.lua @@ -0,0 +1,72 @@ +-- Matter recipes for Krastorio2 +if mods["Krastorio2"] then +local util = require("data-util"); +local matter = require("__Krastorio2__/lib/public/data-stages/matter-util") + +data:extend( +{ + { + type = "technology", + name = "carbon-matter-processing", + icons = + { + { + icon = util.k2assets().."/technologies/matter-coal.png", + icon_size = 256, + }, + { + icon = "__bzcarbon__/graphics/icons/diamond.png", + icon_size = 128, + scale = 1.4, + } + }, + prerequisites = {"kr-matter-processing"}, + unit = + { + count = 350, + ingredients = + { + {"production-science-pack", 1}, + {"utility-science-pack", 1}, + {"matter-tech-card", 1} + }, + time = 45 + } + }, +}) + +local flake_graphite_matter = + { + item_name = "flake-graphite", + minimum_conversion_quantity = 10, + matter_value = 5, + energy_required = 1, + need_stabilizer = false, + unlocked_by_technology = "carbon-matter-processing" + } +matter.createMatterRecipe(flake_graphite_matter) + +local graphite_matter = + { + item_name = "graphite", + minimum_conversion_quantity = 10, + matter_value = 7.5, + energy_required = 2, + only_deconversion = true, + need_stabilizer = true, + unlocked_by_technology = "carbon-matter-processing" + } +matter.createMatterRecipe(graphite_matter) + +local diamond_matter = + { + item_name = "diamond", + minimum_conversion_quantity = 1, + matter_value = 8, + energy_required = 2, + only_deconversion = true, + need_stabilizer = true, + unlocked_by_technology = "carbon-matter-processing" + } +matter.createMatterRecipe(diamond_matter) +end diff --git a/data-updates.lua b/data-updates.lua index ee1399d..0d28f64 100644 --- a/data-updates.lua +++ b/data-updates.lua @@ -1,6 +1,6 @@ require("carbon-recipe-updates") require("map-gen-preset-updates") +require("carbon-matter") +require("strange-matter") --- require("carbon-matter") -- require("omni") --- require("strange-matter") diff --git a/strange-matter.lua b/strange-matter.lua new file mode 100644 index 0000000..78a72c2 --- /dev/null +++ b/strange-matter.lua @@ -0,0 +1,49 @@ +local util = require("data-util"); + + +local ore = "flake-graphite" +local ore_icon = "__bzcarbon__/graphics/icons/flake-graphite.png" + +if mods["StrangeMatter"] then +data:extend({ + { + type = "recipe", + name = ore.."-synthesis", + icons = { + { icon = ore_icon, icon_size = 64 }, + { icon = "__StrangeMatter__/graphics/icons/fluid/matter.png", icon_size = 32, scale=0.5, shift= {-8, -8}}, + }, + enabled = false, + energy_required = 1, + ingredients = {{type="fluid", name="strange-matter", amount = 2}}, + result = ore, + category = "crafting-with-fluid", + subgroup = "synthesis", + }, + { + type = "technology", + name = ore.."-synthesis", + icons = { + { icon = "__StrangeMatter__/graphics/icons/fluid/matter.png", icon_size = 32, shift= {-6, 0}}, + { icon = ore_icon, icon_size = 64, scale=0.25, shift={8, 8}}, + }, + prerequisites = {"stone-synthesis"}, + effects = { + { + type = "unlock-recipe", + recipe = ore.."-synthesis", + }, + }, + unit = { + count = 800, + time = 30, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1}, + {"production-science-pack", 1}, + } + } + } +}) +end