k2
This commit is contained in:
parent
ab65faccfb
commit
b6c08c7613
7 changed files with 75 additions and 48 deletions
|
@ -1,7 +1,6 @@
|
|||
-- 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(
|
||||
{
|
||||
|
@ -20,6 +19,7 @@ data:extend(
|
|||
scale = 1.4,
|
||||
}
|
||||
},
|
||||
effects = {},
|
||||
prerequisites = {"kr-matter-processing"},
|
||||
unit =
|
||||
{
|
||||
|
@ -28,45 +28,58 @@ data:extend(
|
|||
{
|
||||
{"production-science-pack", 1},
|
||||
{"utility-science-pack", 1},
|
||||
{"matter-tech-card", 1}
|
||||
{"kr-matter-tech-card", 1}
|
||||
},
|
||||
time = 45
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
local flake_graphite_matter =
|
||||
{
|
||||
item_name = "flake-graphite",
|
||||
minimum_conversion_quantity = 10,
|
||||
matter_value = 5,
|
||||
util.k2matter({
|
||||
k2matter = {
|
||||
material = {
|
||||
name = "flake-graphite",
|
||||
type = "item",
|
||||
amount = 10,
|
||||
},
|
||||
matter_count = 5,
|
||||
energy_required = 1,
|
||||
need_stabilizer = false,
|
||||
unlocked_by_technology = "carbon-matter-processing"
|
||||
needs_stabilizer = false,
|
||||
allow_productivity = true,
|
||||
unlocked_by = "carbon-matter-processing"
|
||||
}
|
||||
matter.createMatterRecipe(flake_graphite_matter)
|
||||
})
|
||||
|
||||
local graphite_matter =
|
||||
{
|
||||
item_name = "graphite",
|
||||
minimum_conversion_quantity = 10,
|
||||
matter_value = 7.5,
|
||||
util.k2matter({
|
||||
k2matter = {
|
||||
material = {
|
||||
name = "graphite",
|
||||
type = "item",
|
||||
amount = 10,
|
||||
},
|
||||
matter_count = 7.5,
|
||||
energy_required = 2,
|
||||
needs_stabilizer = true,
|
||||
allow_productivity = true,
|
||||
only_deconversion = true,
|
||||
need_stabilizer = true,
|
||||
unlocked_by_technology = "carbon-matter-processing"
|
||||
unlocked_by = "carbon-matter-processing"
|
||||
}
|
||||
matter.createMatterRecipe(graphite_matter)
|
||||
})
|
||||
|
||||
local diamond_matter =
|
||||
{
|
||||
item_name = "diamond",
|
||||
minimum_conversion_quantity = 1,
|
||||
matter_value = 8,
|
||||
util.k2matter({
|
||||
k2matter = {
|
||||
material = {
|
||||
name = "diamond",
|
||||
type = "item",
|
||||
amount = 1,
|
||||
},
|
||||
matter_count = 8,
|
||||
energy_required = 2,
|
||||
needs_stabilizer = true,
|
||||
allow_productivity = true,
|
||||
only_deconversion = true,
|
||||
need_stabilizer = true,
|
||||
unlocked_by_technology = "carbon-matter-processing"
|
||||
unlocked_by = "carbon-matter-processing"
|
||||
}
|
||||
matter.createMatterRecipe(diamond_matter)
|
||||
})
|
||||
|
||||
end
|
||||
|
|
|
@ -32,18 +32,18 @@ data:extend({
|
|||
},
|
||||
ingredients = {
|
||||
{type="item", name="flake-graphite", amount=10},
|
||||
{type="fluid", name="water", amount=25, catalyst_amount=25},
|
||||
{type="fluid", name="hydrogen-chloride", amount=25},
|
||||
{type="fluid", name="water", amount=25, ignored_by_stats=25, ignored_by_productivity=25},
|
||||
{type="fluid", name="kr-hydrogen-chloride", amount=25},
|
||||
},
|
||||
results = {
|
||||
{type="item", name="graphite", amount=18},
|
||||
{type="fluid", name="kr-dirty-water", amount=25, catalyst_amount=25},
|
||||
{type="fluid", name="kr-dirty-water", amount=25, ignored_by_stats=25, ignored_by_productivity=25},
|
||||
},
|
||||
},
|
||||
{
|
||||
type = "recipe",
|
||||
name = "kr-dirty-water-filtration-graphite",
|
||||
category = "fluid-filtration",
|
||||
name = "dirty-water-filtration-graphite",
|
||||
category = "kr-fluid-filtration",
|
||||
icons =
|
||||
{
|
||||
{
|
||||
|
@ -133,18 +133,18 @@ data:extend({
|
|||
{ icon = util.k2assets().."/icons/fluids/heavy-water.png", icon_size = 64, icon_mipmaps = 3,},
|
||||
{ icon = "__bzcarbon__/graphics/icons/graphene.png", icon_size = 128, scale=0.25, shift= {-8, -8}},
|
||||
},
|
||||
category = "electrolysis",
|
||||
category = "kr-electrolysis",
|
||||
subgroup = "fluid-recipes",
|
||||
order = "y06[heavy-water]",
|
||||
enabled = false,
|
||||
energy_required = 60,
|
||||
ingredients = {
|
||||
{type="item", name="graphene", amount=1, catalyst_amount=1},
|
||||
{type="item", name="graphene", amount=1, ignored_by_stats=1, ignored_by_productivity=1},
|
||||
{type="fluid", name="water", amount=500},
|
||||
},
|
||||
results = {
|
||||
{type="item", name="graphene", amount=1, probability=.8, catalyst_amount=1},
|
||||
{type="fluid", name="heavy-water", amount=40},
|
||||
{type="item", name="graphene", amount=1, probability=.8, ignored_by_stats=1, ignored_by_productivity=1},
|
||||
{type="fluid", name="kr-heavy-water", amount=40},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
|
|
@ -9,7 +9,7 @@ if mods["space-age"] then
|
|||
graphite_category = "basic-crushing"
|
||||
end
|
||||
if mods.Krastorio2 then
|
||||
graphite_category = "crushing"
|
||||
graphite_category = "kr-crushing"
|
||||
end
|
||||
|
||||
data:extend({
|
||||
|
@ -277,6 +277,7 @@ data:extend({
|
|||
order = "b-b"
|
||||
},
|
||||
})
|
||||
local ammonia = mods.Krastorio2 and "kr-ammonia" or "ammonia"
|
||||
data:extend({
|
||||
-- graphene
|
||||
{
|
||||
|
@ -302,7 +303,8 @@ data:extend({
|
|||
energy_required = 5,
|
||||
ingredients = (mods["space-age"] or mods.Krastorio2) and {
|
||||
{type="item", name="graphite", amount=1},
|
||||
{type="fluid", name="ammonia", amount=5},
|
||||
{type="fluid", name=ammonia, amount=5},
|
||||
{type="fluid", name="water", amount=10},
|
||||
{type="fluid", name="sulfuric-acid", amount=5},
|
||||
} or {
|
||||
{type="item", name="graphite", amount=1},
|
||||
|
@ -382,7 +384,7 @@ data:extend({
|
|||
ingredients = mods.Krastorio2 and
|
||||
{
|
||||
{type="item", name="graphite", amount=2},
|
||||
{type="fluid", name="nitrogen", amount=2},
|
||||
{type="fluid", name="kr-nitrogen", amount=2},
|
||||
} or
|
||||
{
|
||||
{type="item", name="graphite", amount=2},
|
||||
|
@ -473,8 +475,8 @@ data:extend({
|
|||
{"production-science-pack", 1},
|
||||
{"utility-science-pack", 1},
|
||||
{"space-science-pack", 1},
|
||||
{"matter-tech-card", 1},
|
||||
{"advanced-tech-card", 1},
|
||||
{"kr-matter-tech-card", 1},
|
||||
{"kr-advanced-tech-card", 1},
|
||||
}) or
|
||||
{
|
||||
{"automation-science-pack", 1},
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Version: 2.0.17
|
||||
Date: 2025-05-03
|
||||
Changes:
|
||||
- K2: Compatbility updates
|
||||
- K2: Compatbility updates (with thanks to autechr3 and pla)
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 2.0.16
|
||||
Date: 2025-04-20
|
||||
|
|
|
@ -10,6 +10,13 @@ require("compatibility/orewashing")
|
|||
-- require("omni")
|
||||
|
||||
local util = require("data-util");
|
||||
|
||||
if util.me.use_flake_graphite() then
|
||||
if mods.Krastorio2 then
|
||||
require("tech-triggers") -- For K2 this has to be in data updates as K2 unsafely access the tech research unit
|
||||
end
|
||||
end
|
||||
|
||||
util.add_gleba_rock("flake-graphite")
|
||||
util.add_gleba_rock("rough-diamond", 2, 3)
|
||||
|
||||
|
|
10
data.lua
10
data.lua
|
@ -21,13 +21,9 @@ end
|
|||
util.add_fluid_mining()
|
||||
|
||||
if util.me.use_flake_graphite() then
|
||||
util.set_tech_trigger("fluid-mining", {type="craft-fluid", fluid="steam", amount=500})
|
||||
util.set_prerequisite("fluid-mining", {"steam-power"})
|
||||
util.add_unlock("steam-power", "copper-cable")
|
||||
util.add_unlock("steam-power", "small-electric-pole")
|
||||
util.set_prerequisite("electric-mining-drill", {"steam-power"})
|
||||
util.set_tech_trigger("electric-mining-drill", {type="craft-item", item="small-electric-pole", count=10})
|
||||
util.set_prerequisite("graphite-processing", {"fluid-mining", "electric-mining-drill"})
|
||||
if not mods.Krastorio2 then
|
||||
require("tech-triggers")
|
||||
end
|
||||
else
|
||||
util.set_prerequisite("graphite-processing", {})
|
||||
end
|
||||
|
|
9
tech-triggers.lua
Normal file
9
tech-triggers.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
local util = require("data-util");
|
||||
|
||||
util.set_tech_trigger("fluid-mining", {type="craft-fluid", fluid="steam", amount=500})
|
||||
util.set_prerequisite("fluid-mining", {"steam-power"})
|
||||
util.add_unlock("steam-power", "copper-cable")
|
||||
util.add_unlock("steam-power", "small-electric-pole")
|
||||
util.set_prerequisite("electric-mining-drill", {"steam-power"})
|
||||
util.set_tech_trigger("electric-mining-drill", {type="craft-item", item="small-electric-pole", count=10})
|
||||
util.set_prerequisite("graphite-processing", {"fluid-mining", "electric-mining-drill"})
|
Loading…
Add table
Add a link
Reference in a new issue