2.0, space age, other updates

This commit is contained in:
Brevven 2025-01-29 01:29:12 -08:00
parent f8ff3472fb
commit b7c12bef38
61 changed files with 1869 additions and 605 deletions

View file

@ -4,6 +4,9 @@ local graphite_category = "advanced-crafting"
if mods["space-exploration"] then
graphite_category = "pulverising"
end
if mods["space-age"] then
graphite_category = "basic-crushing"
end
if mods.Krastorio2 then
graphite_category = "crushing"
end
@ -19,12 +22,13 @@ data:extend({
icon = "__bzcarbon__/graphics/icons/graphite.png",
icon_size = 128,
pictures = {
{filename="__bzcarbon__/graphics/icons/graphite.png", size=128, scale=0.125},
{filename="__bzcarbon__/graphics/icons/graphite-1.png", size=128, scale=0.125},
{filename="__bzcarbon__/graphics/icons/graphite-2.png", size=128, scale=0.125},
{filename="__bzcarbon__/graphics/icons/graphite.png", size=128, scale=0.25},
{filename="__bzcarbon__/graphics/icons/graphite-1.png", size=128, scale=0.25},
{filename="__bzcarbon__/graphics/icons/graphite-2.png", size=128, scale=0.25},
},
subgroup = "raw-material",
order = "g[graphite]",
weight = 1*kg,
stack_size = util.get_stack_size(100)
},
{
@ -35,28 +39,28 @@ data:extend({
icons = (mods["Krastorio2"] and
{
{ icon = "__bzcarbon__/graphics/icons/graphite.png", icon_size = 128},
{ icon = "__bzcarbon__/graphics/icons/flake-graphite.png", icon_size = 64, icon_mipmaps = 3, scale=0.25, shift= {-8, -8}},
{ icon = "__bzcarbon__/graphics/icons/flake-graphite.png", icon_size = 128, icon_mipmaps = 3, scale=0.25, shift= {-8, -8}},
} or nil),
normal = (mods["Krastorio2"] and
{
enabled = false,
energy_required = 5,
ingredients = {{"flake-graphite", 10}},
results = {{type="item", name= "graphite", amount=10}},
} or
{
enabled = false,
energy_required = 0.5,
ingredients = {{"flake-graphite", 1}},
result = "graphite"
}),
expensive =
{
enabled = false,
energy_required = 1,
ingredients = {{"flake-graphite", 2}},
result = "graphite"
}
-- normal = (mods["Krastorio2"] and
-- {
-- enabled = false,
-- energy_required = 5,
-- ingredients = {util.item("flake-graphite", 10)},
-- results = {{type="item", name= "graphite", amount=10}},
-- } or
enabled = false,
allow_productivity=true,
energy_required = 0.5,
ingredients = {util.item("flake-graphite", 1)},
results = {util.item("graphite")},
-- expensive =
-- {
-- enabled = false,
-- energy_required = 1,
-- ingredients = {util.item("flake-graphite", 2)},
-- result = "graphite"
-- }
},
{
type = "technology",
@ -90,8 +94,8 @@ if not util.me.use_flake_graphite() then
order = "d[graphite]",
enabled = false,
energy_required = 0.5,
ingredients = {{"coke", 1}},
results = {{"graphite", 2}},
ingredients = {util.item("coke", 1)},
results = {util.item("graphite", 2)},
}
})
else
@ -105,8 +109,8 @@ if not util.me.use_flake_graphite() then
order = "d[graphite]",
enabled = false,
energy_required = 0.5,
ingredients = {{"coal", 1}},
results = {{"graphite", 1}, {type="item", name="stone", amount=1, probability=0.05}},
ingredients = {util.item("coal", 1)},
results = {util.item("graphite", 1), {type="item", name="stone", amount=1, probability=0.05}},
}
})
end
@ -124,7 +128,7 @@ end
if mods.Krastorio2 then
util.add_prerequisite("graphite-processing", "kr-crusher")
else
util.add_prerequisite("graphite-processing", "automation")
-- util.add_prerequisite("graphite-processing", "automation")
end
@ -138,8 +142,8 @@ data:extend({
order = "d[graphite]",
enabled = false,
energy_required = 0.5,
ingredients = {{"flake-graphite", 2}},
result = "graphite"
ingredients = {util.item("flake-graphite", 2)},
results = {util.item("graphite")},
}
})
util.add_effect("graphite-processing", { type = "unlock-recipe", recipe = "graphite-se" })
@ -157,8 +161,8 @@ data:extend({
order = "d[graphite]",
enabled = true,
energy_required = 0.5,
ingredients = {{"flake-graphite", 1}},
results = {{"graphite", 2}},
ingredients = {util.item("flake-graphite", 1)},
results = {util.item("graphite", 2)},
}
})
end
@ -172,6 +176,7 @@ data:extend({
icon_size = 128,
subgroup = "raw-material",
order = "g[diamond]",
weight = 4*kg,
stack_size = util.get_stack_size(100)
},
{
@ -179,31 +184,23 @@ data:extend({
name = "synthetic-diamond",
category = "diamond-synthesis",
order = "d[diamond]",
icons = (mods["Krastorio2"] and
icons = (util.me.use_rough_diamond() and
{
{ icon = "__bzcarbon__/graphics/icons/diamond.png", icon_size = 128},
{ icon = "__bzcarbon__/graphics/icons/graphite-2.png", icon_size = 128, scale=0.125, shift= {-8, -8}},
} or nil),
normal = (mods["Krastorio2"] and
{
enabled = false,
energy_required = 20,
ingredients = {{"graphite", 10}},
results = {{type="item", name= "diamond", amount=1}},
} or
{
enabled = false,
energy_required = 20,
ingredients = {{"graphite", 10}},
result = "diamond"
}),
expensive =
{
enabled = false,
energy_required = 30,
ingredients = {{"graphite", 20}},
result = "diamond"
}
allow_productivity=true,
enabled = false,
energy_required = 20,
ingredients = {util.item("graphite", mods["space-age"] and 20 or 10)},
results = {util.item("diamond")},
-- expensive =
-- {
-- enabled = false,
-- energy_required = 30,
-- ingredients = {util.item("graphite", 20)},
-- result = "diamond"
-- }
},
util.me.use_rough_diamond() and {
type = "recipe",
@ -216,32 +213,31 @@ data:extend({
{ icon = "__bzcarbon__/graphics/icons/diamond.png", icon_size = 128},
{ icon = "__bzcarbon__/graphics/icons/rough-diamond.png", icon_size = 64, scale=0.25, shift= {-8, -8}},
} or {{ icon = "__bzcarbon__/graphics/icons/diamond.png", icon_size = 128}}),
normal = (mods["Krastorio2"] and
{
enabled = false,
energy_required = 20,
ingredients = {{"rough-diamond", 1}},
results = {
{type="item", name= "diamond", amount=1, probability=0.8},
{type="item", name= "stone", amount=1, probability=0.2}
},
} or
{
enabled = false,
energy_required = 20,
ingredients = {{"rough-diamond", 1}},
results = {
{type="item", name= "diamond", amount=1, probability=0.8},
{type="item", name= "stone", amount=1, probability=0.2}
},
}),
expensive =
{
enabled = false,
energy_required = 40,
ingredients = {{"rough-diamond", 1}},
result = "diamond"
}
-- normal = (mods["Krastorio2"] and
-- {
-- enabled = false,
-- energy_required = 20,
-- ingredients = {util.item("rough-diamond", 1)},
-- results = {
-- {type="item", name= "diamond", amount=1, probability=0.8},
-- {type="item", name= "stone", amount=1, probability=0.2}
-- },
-- } or
enabled = false,
allow_productivity=true,
energy_required = 20,
ingredients = {util.item("rough-diamond", 1)},
results = {
{type="item", name= "diamond", amount=1, probability=0.8},
{type="item", name= "stone", amount=1, probability=0.2}
},
-- expensive =
-- {
-- enabled = false,
-- energy_required = 40,
-- ingredients = {util.item("rough-diamond", 1)},
-- result = "diamond"
-- }
} or nil,
})
data:extend({
@ -256,7 +252,7 @@ data:extend({
type = "unlock-recipe",
recipe = "synthetic-diamond"
},
util.me.use_rough_diamond() and {
util.me.use_rough_diamond() and not mods["space-age"] and {
type = "unlock-recipe",
recipe = "diamond-processing"
} or nil,
@ -285,6 +281,7 @@ data:extend({
icon_size = 128,
subgroup = "intermediate-product",
order = "g[graphite]",
weight = 2*kg,
stack_size = util.get_stack_size(200)
},
{
@ -293,8 +290,9 @@ data:extend({
category = "chemistry",
order = "d[graphite]",
enabled = false,
allow_productivity=true,
energy_required = 6,
ingredients = mods.Krastorio2 and {
ingredients = (mods["space-age"] or mods.Krastorio2) and {
{type="item", name="graphite", amount=1},
{type="fluid", name="ammonia", amount=5},
{type="fluid", name="sulfuric-acid", amount=5},
@ -303,7 +301,7 @@ data:extend({
{type="fluid", name="water", amount=10},
{type="fluid", name="sulfuric-acid", amount=10},
},
result = "graphene"
results = {util.item("graphene")},
},
{
type = "technology",
@ -338,6 +336,16 @@ data:extend({
order = "b-b"
},
})
if mods["space-age"] then
util.set_prerequisite("graphene", {"agricultural-science-pack"})
util.set_tech_recipe("graphene", {
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
{"agricultural-science-pack", 1},
})
end
-- fullerenes
if util.me.use_fullerenes() then
@ -349,14 +357,16 @@ data:extend({
icon_size = 128,
subgroup = "intermediate-product",
order = "g[graphite-fullerenes]",
weight = 2*kg,
stack_size = util.get_stack_size(200),
},
{
type = "recipe",
name = "fullerenes",
category = "chemistry",
category = mods["space-age"] and "electronics-or-assembling" or "advanced-crafting",
order = "d[graphite-fullerenes]",
enabled = false,
allow_productivity=true,
energy_required = 1,
ingredients = mods.Krastorio2 and
{
@ -366,8 +376,7 @@ data:extend({
{
{type="item", name="graphite", amount=2},
},
result = "fullerenes",
result_count = 20,
results = {util.item("fullerenes", 20)},
},
{
type = "technology",
@ -402,6 +411,7 @@ data:extend({
icon_size = 128,
subgroup = "intermediate-product",
order = "g[graphite-nanotubes]",
weight = 2*kg,
stack_size = util.get_stack_size(200),
},
{
@ -414,6 +424,7 @@ data:extend({
subgroup = "intermediate-product",
order = "d[graphite-nanotubes]",
enabled = false,
allow_productivity=true,
energy_required = 20,
ingredients = {
{type="item", name="fullerenes", amount=1},
@ -477,6 +488,7 @@ data:extend({
icon_size = 64, icon_mipmaps = 3,
subgroup = "intermediate-product",
order = "g[graphite-carbon-black]",
weight = 1*kg,
stack_size = util.get_stack_size(100),
},
{
@ -487,6 +499,7 @@ data:extend({
category = "chemistry",
order = "d[graphite-carbon-black]",
enabled = false,
allow_productivity=true,
energy_required = 1,
ingredients = {
{type="item", name="coal", amount=1},
@ -505,12 +518,12 @@ data:extend({
category = "chemistry",
order = "d[graphite]",
enabled = false,
allow_productivity=true,
energy_required = 1,
ingredients = {
{type="item", name="carbon-black", amount=10},
},
result = "graphite",
result_count = 1,
results = {util.item("graphite", 1)},
},
})
end
@ -523,6 +536,7 @@ data:extend({
icon = "__bzcarbon__/graphics/icons/crucible.png", icon_size = 128,
subgroup = "intermediate-product",
order = "g[crucible]",
weight = 4*kg,
stack_size = 50,
},
{
@ -531,12 +545,12 @@ data:extend({
category = "crafting",
order = "d[graphite]",
enabled = false,
allow_productivity=true,
energy_required = 3,
ingredients = {
{type="item", name="graphite", amount=5},
},
result = "crucible",
result_count = 1,
results = {util.item("crucible", 1)},
},
})
@ -557,3 +571,84 @@ if mods["space-exploration"] and string.sub(mods["space-exploration"], 1, 3) ==
util.set_item_subgroup("fullerenes", "carbon")
util.set_item_subgroup("nanotubes", "carbon")
end
-- Set early tech tree
util.set_tech_trigger("graphite-processing", {type = "mine-entity", entity = "graphite"})
util.add_prerequisite("graphite-processing", "steam-power")
if mods["space-age"] then
data:extend({
{
type = "surface-property",
name = "oxygen",
default_value = 19,
},
-- make graphite from diamonds on some surfaces
{
type = "recipe",
name = "graphitization",
icons = {
{icon = "__bzcarbon__/graphics/icons/graphite.png", icon_size = 128},
{icon = "__bzcarbon__/graphics/icons/rough-diamond.png", icon_size = 128, scale = 0.125, shift={-8,-8}},
},
category = "smelting",
order = "d[graphite]",
enabled = false,
allow_productivity=true,
energy_required = 16,
surface_conditions = {
{property = "oxygen", max = 20},
},
ingredients = {
{type="item", name="rough-diamond", amount=1},
},
show_amount_in_title = false,
results = {util.item("graphite", 10)},
},
{
type = "technology",
name = "diamond-processing-2",
icon_size = 128,
icon = "__bzcarbon__/graphics/icons/diamond.png",
effects =
{
{
type = "unlock-recipe",
recipe = "graphitization"
},
{
type = "unlock-recipe",
recipe = "diamond-processing"
},
},
research_trigger = {
type = "mine-entity",
entity = "diamond",
},
prerequisites = {"planet-discovery-vulcanus"},
order = "b-b"
},
-- Graphite from spoilage via carbon
{
type = "recipe",
name = "graphite-synthesis",
category = "organic-or-chemistry",
order = "d[graphite]",
enabled = false,
allow_productivity=true,
energy_required = 8/3,
ingredients = {
{type="item", name="carbon", amount=1},
},
results = {util.item("graphite", 1)},
},
})
util.add_unlock("biochamber", "graphite-synthesis")
util.set_recipe_time("burnt-spoilage", 4)
util.set_surface_property("nauvis", "oxygen", 21)
util.set_surface_property("gleba", "oxygen", 30)
util.set_surface_property("fulgora", "oxygen", 15)
util.set_surface_property("vulcanus", "oxygen", 12)
util.set_surface_property("aquilo", "oxygen", 10)
util.set_surface_property("space-platform", "oxygen", 0)
end