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

@ -24,10 +24,14 @@ copy: link
mkdir -p ../$(v)
cp -rf * ../$(v)
rm -f ../$(v).zip
cd ..; zip -9 -r -y $(v).zip $(v) -x "*.xcf" -x "*.git*" -x "*.bak" -x "*.blend*"
#cd ..; zip -9 -r -y $(v).zip $(v) -x "*.xcf" -x "*.git*" -x "*.bak" -x "*.blend*"
install: lint-changelog copy
cp -f ../$(v).zip ../../mods/
# Next 3 lines are dev only (uncomment zip lines and comment these)
rm -rf ../../mods/$(v)
mkdir ../../mods/$(v)
cp -r * ../../mods/$(v)
#cp -f ../$(v).zip ../../mods/
lint-changelog: copy
python3 ../da-changelog-tools_0.0.14/changelog-checker.py --changelog ../$(v).zip

View file

@ -1,12 +1,12 @@
local util = require("data-util");
if util.me.use_fiber() then
util.replace_ingredient("low-density-structure", "plastic-bar", "carbon-fiber")
util.replace_ingredient("se-low-density-structure-beryllium", "plastic-bar", "carbon-fiber")
util.replace_ingredient("combat-shotgun", "wood", "carbon-fiber")
util.add_ingredient("exoskeleton-equipment", "carbon-fiber", 10)
if not mods["space-age"] then
util.replace_ingredient("low-density-structure", "plastic-bar", "carbon-fiber")
util.replace_ingredient("se-low-density-structure-beryllium", "plastic-bar", "carbon-fiber")
util.add_ingredient("exoskeleton-equipment", "carbon-fiber", 10)
util.replace_ingredient("combat-shotgun", "wood", "carbon-fiber")
end
util.replace_some_ingredient("flying-fortress", util.titanium_plate, 1000, "carbon-fiber", 2000)
util.replace_some_ingredient("flying-fortress", "steel-plate", 1000, "carbon-fiber", 2000)
end

View file

@ -1,90 +0,0 @@
local util = require("data-util");
if util.me.use_fiber() then
data:extend({
{
type = "item",
name = "polyacrylonitrile",
icon = "__bzcarbon__/graphics/icons/pan.png",
icon_size = 128,
subgroup = "intermediate-product",
order = "g[graphite-acrylic-fiber]",
stack_size = util.get_stack_size(100),
},
{
type = "recipe",
name = "polyacrylonitrile",
category = "chemistry",
order = "d[graphite-carbon-fiber]",
enabled = false,
energy_required = 1,
ingredients = data.raw.fluid["ammonia"] and
{
{type="fluid", name="petroleum-gas", amount=5},
{type="fluid", name="ammonia", amount=5},
} or {
{type="fluid", name="petroleum-gas", amount=10},
},
results = {
{type="item", name= "polyacrylonitrile", amount=1},
},
},
})
data:extend({
{
type = "item",
name = "carbon-fiber",
icon = "__bzcarbon__/graphics/icons/carbon-fiber.png",
icon_size = 128,
subgroup = "intermediate-product",
order = "g[graphite-carbon-fiber]",
stack_size = util.get_stack_size(100),
},
{
type = "recipe",
name = "carbon-fiber",
category = "advanced-crafting",
order = "d[graphite-carbon-fiber]",
enabled = false,
energy_required = 24,
ingredients = {
{type="fluid", name="epoxy", amount = 20},
{"plastic-bar", 2},
{"polyacrylonitrile", 4},
},
results = {
{type="item", name= "carbon-fiber", amount=8},
},
},
})
util.replace_some_ingredient("carbon-fiber", "plastic", 1, "silica", 2, {force=true})
data:extend({
{
type = "technology",
name = "carbon-fiber",
icon_size = 256,
icon = "__bzcarbon__/graphics/technology/carbon-fiber.png",
effects = {
{type="unlock-recipe", recipe="polyacrylonitrile"},
{type="unlock-recipe", recipe="carbon-fiber"},
},
unit =
{
count = 30,
ingredients =
{
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
},
time = 10,
},
prerequisites = {"chemical-science-pack", "plastics"},
order = "b-b"
},
})
util.add_prerequisite("low-density-structure", "carbon-fiber")
util.add_prerequisite("exoskeleton-equipment", "carbon-fiber")
util.add_prerequisite("military-3", "carbon-fiber")
end

View file

@ -2,7 +2,7 @@
local util = require("data-util");
if deadlock then
if deadlock and deadlock["add_stack"] then
deadlock.add_stack("flake-graphite", "__bzcarbon__/graphics/icons/stacked/flake-graphite-stacked.png", "deadlock-stacking-1", 64)
deadlock.add_stack("graphite", "__bzcarbon__/graphics/icons/stacked/graphite-stacked.png", "deadlock-stacking-1", 128)
deadlock.add_stack("diamond", "__bzcarbon__/graphics/icons/stacked/diamond-stacked.png" , "deadlock-stacking-2", 128)

View file

@ -1,26 +0,0 @@
-- Enable prod modules for all recipes
local util = require("data-util");
local recipes = util.me.recipes
-- Add all *-nanotubes recipes that exist
local ending = "-nanotubes"
for i, recipe in pairs(data.raw.recipe) do
if recipe.name:sub(-#ending) == ending then
table.insert(recipes, recipe.name)
end
end
for i, recipe in pairs(recipes) do
if data.raw.recipe[recipe] then
for j, module in pairs(data.raw.module) do
if module.effect then
for effect_name, effect in pairs(module.effect) do
if effect_name == "productivity" and effect.bonus > 0 and module.limitation and #module.limitation > 0 then
table.insert(module.limitation, recipe)
end
end
end
end
end
end

View file

@ -21,6 +21,9 @@ end
util.add_effect("advanced-material-processing-2", {type="unlock-recipe", recipe="crucible"})
for i, ingredient in pairs(util.me.crucible_ingredients) do
util.add_ingredient("crucible", ingredient, 5)
if data.raw.item[ingredient] then
util.add_to_product("crucible", "crucible", 1)
end
end
for i, furnace in pairs(util.me.furnaces) do
util.add_ingredient(furnace, "crucible", 1)
@ -29,6 +32,21 @@ for i, furnace in pairs(util.me.furnaces) do
end
end
-- space age
if mods["space-age"] then
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)
if data.raw.fluid["vacuum"] then
util.add_ingredient("graphite-synthesis", "vacuum", 4)
end
util.remove_product("scrap-recycling", "solder")
util.add_product("scrap-recycling", util.item("rough-diamond", 1, .01))
util.set_product_probability("scrap-recycling", "processing-unit", 0.03)
util.add_ingredient("cryogenic-plant", "graphene", 20)
util.add_ingredient("fluoroketone", "graphene", 1)
end
-- fullerenes & nanotubes
if util.me.use_fullerenes() then
util.add_prerequisite("graphene", "fullerenes")
@ -37,6 +55,10 @@ if util.me.use_fullerenes() then
if not mods.Krastorio2 then
util.replace_some_ingredient("slowdown-capsule", "coal", 4, "fullerenes", 40)
end
util.add_ingredient("capture-bot-rocket", "fullerenes", 10)
util.add_ingredient("biolab", "fullerenes", 50)
util.add_ingredient("overgrowth-yumako-soil", "fullerenes", 50)
util.add_ingredient("overgrowth-jellynut-soil", "fullerenes", 50)
-- K2
util.add_ingredient("kr-biter-virus", "fullerenes", 100)
@ -56,10 +78,13 @@ if util.me.use_carbon_black() then
-- Plastic from carbon black, carbon black from oil processing
util.replace_ingredient("plastic-bar", "coal", "carbon-black")
util.add_product("basic-oil-processing", {"carbon-black", 1})
util.add_product("advanced-oil-processing", {"carbon-black", 1})
util.add_product("light-oil-cracking", {"carbon-black", 1})
util.add_product("heavy-oil-cracking", {"carbon-black", 1})
util.add_product("basic-oil-processing", util.item("carbon-black", 1))
util.add_product("advanced-oil-processing", util.item("carbon-black", 1))
util.add_product("light-oil-cracking", util.item("carbon-black", 1))
util.add_product("heavy-oil-cracking", util.item("carbon-black", 1))
-- More outlets for carbon black now, so can make it here too
util.add_product("simple-coal-liquefaction", util.item("carbon-black", 1))
util.add_product("coal-liquefaction", util.item("carbon-black", 1))
--K2
if mods.bztitanium then
@ -91,7 +116,8 @@ elseif data.raw.recipe["speed-module-4"] then
util.add_ingredient("productivity-module-4", "diamond", 6)
else
util.add_ingredient("speed-module-2", "diamond", 1)
util.add_ingredient("effectivity-module-2", "diamond", 1)
util.add_ingredient("efficiency-module-2", "diamond", 1)
util.add_ingredient("quality-module-2", "diamond", 1)
util.add_ingredient("productivity-module-2", "diamond", 1)
end
util.add_ingredient("laser-turret", "diamond", 1)

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

View file

@ -11,6 +11,7 @@ function cutil.nanotube_recipe(recipe_name, item_name, tech)
local new_recipe = futil.table.deepcopy(data.raw.recipe[recipe_name])
new_recipe.name = recipe_name.."-nanotubes"
new_recipe.localised_name = {"item-name."..item_name}
new_recipe.icons = {
{ icon = data.raw.item[item_name].icon, icon_size = data.raw.item[item_name].icon_size},
{ icon = "__bzcarbon__/graphics/icons/nanotube.png", icon_size = 128, scale=0.125, shift= {-8, -8}},

View file

@ -1,4 +1,14 @@
---------------------------------------------------------------------------------------------------
Version: 2.0.0
Date: 2025-01-21
Changes:
- Update to Factorio 2.0 and Space Age, can be added to existing games.
Use /bz-regenerate to see help on regenerating ore patches (especially useful on Vulcanus)
- Space Age: Diamond ore patches are only on Vulcanus. Graphite is on Nauvis
- Updates to Space Age carbon fiber (Note: 2.0 vanilla carbon fiber is not yet available)
- New graphics for flake graphite, rough diamonds and some other items.
- Improved graphics for graphite and diamond ore patches.
---------------------------------------------------------------------------------------------------
Version: 0.5.9
Date: 2024-02-17
Fixes:

View file

@ -2,6 +2,8 @@ local me = require("me")
local util = {}
util.me = me
local regenerate_command = "bz-regenerate"
local list_command = "bz-list"
function decode(data)
if type(data) == "string" then return data end
@ -12,8 +14,22 @@ function decode(data)
return table.concat(str, "")
end
function util.get_list()
local p = game.item_prototypes[me.name.."-list"]
function util.check_fluid_mining()
if me.fluid_mining then
for i, force in pairs(game.forces) do
if (
(force.technologies["uranium-processing"] and force.technologies["uranium-processing"].researched) or
(force.technologies["titanium-processing"] and force.technologies["titanium-processing"].researched) or
false
) then
force.technologies["fluid-mining"].researched = true
end
end
end
end
function get_list()
local p = prototypes.item[me.name.."-list"]
if p then
data = p.localised_description
return decode(data)
@ -26,6 +42,39 @@ function util.force_enable_recipe(event, recipe_name)
end
end
function list(event)
if event.command and string.lower(event.command) == "bz-list" then
local player = game.players[event.player_index]
if player and player.connected then
local list = get_list()
if list and #list>0 then
local filename = util.me.name..".txt"
helpers.write_file(filename, list, false, event.player_index)
player.print("Wrote recipes to script-output/"..filename)
else
player.print("Please change your mod startup setting for this mod's modified recipes list.")
end
end
end
end
function util.add_command_handler()
script.on_event(defines.events.on_console_command, route)
end
function route(event)
if event.command == regenerate_command then regenerate_ore(event) end
if event.command == list_command then list(event) end
end
function util.add_list_command_handler()
util.add_command_handler()
if not commands.commands[list_command] then
commands.add_command(list_command, "", function() end)
end
end
function util.warptorio2_expansion_helper()
if script.active_mods["warptorio2_expansion"] then
@ -81,6 +130,169 @@ function util.warptorio2_expansion_helper()
end
end
local usage_regenerate = [[
Recommend saving the game before running this command.
Usage: /bz-regenerate all
or /bz-regenerate <planet> <resource> [<frequency> <size> <richness>]
planet must be an internal name like nauvis
resource must be an internal name like lead-ore or titanium-ore
frequency, size, and richness are optional, but all or none must be provided, and each should be a number between 0.166 and 6, where 1 is default setting.
Regenerates ore patches. If frequency/size/richness are provided, the planet will use those settings from now on, as well.
- Separate arguments with spaces, do not use < >, [ ], quotes or other symbols
- This action can take a while for larger maps!
- Ores can sometimes overlap on regeneration. This can sometimes hide ore patches. If none seem to be made for a resource, regenerate just that resource and tweak frequency/size.
]]
function util.add_regenerate_command_handler()
util.add_command_handler()
if not commands.commands[regenerate_command] then
commands.add_command( regenerate_command, usage_regenerate, function() end)
end
end
function regenerate_ore(event)
if event.command == regenerate_command then
local params = {}
for w in event.parameters:gmatch("%S+") do table.insert(params, w) end
if #params == 1 and params[1] == "all" then
for _, resource in pairs(me.resources) do
if prototypes.entity[resource[1]] then
game.print("Regenerating "..resource[1])
game.regenerate_entity(resource[1])
end
end
return
end
if not (#params == 2 or #params == 5) then
game.print(usage_regenerate)
return
end
local planet = params[1]
for _, resource in pairs(me.resources) do
if not game.surfaces[planet] then
game.print("Could not find surface for "..planet..". May not exist, or may not yet be explored.")
return
end
if resource[1] == params[2] and resource[2] == planet then
if #params == 5 then
local settings = {frequency=params[3], size=params[4], richness=params[5]}
local map_gen_settings = game.surfaces[planet].map_gen_settings
map_gen_settings.autoplace_controls[resource[1]] = settings
map_gen_settings.autoplace_settings.entity.settings[resource[1]] = settings
game.surfaces[planet].map_gen_settings = map_gen_settings
game.print("Set "..resource[1].." on "..planet.." to "..serpent.line(settings))
end
game.print("Regenerating "..resource[1])
game.surfaces[planet].regenerate_entity(resource[1])
end
end
end
end
function util.ore_fix()
ore_fix("nauvis")
ore_fix("vulcanus")
if game.surfaces.tenebris then
ore_fix("tenebris")
end
end
function ore_fix(surface_name)
for _, resource in pairs(me.resources) do
if resource[2] == surface_name then
if game.surfaces[resource[2]] then
local map_gen_settings = game.surfaces[surface_name].map_gen_settings
if map_gen_settings.autoplace_controls[resource[1]] == nil then
map_gen_settings.autoplace_controls[resource[1]] = {}
end
if map_gen_settings.autoplace_settings.entity.settings[resource[1]] == nil then
map_gen_settings.autoplace_settings.entity.settings[resource[1]] = {}
end
game.surfaces[surface_name].map_gen_settings = map_gen_settings
end
end
end
end
-- A workaround for generating ores until this bug is fixed:
-- https://forums.factorio.com/viewtopic.php?f=7&t=124996&p=655013#p655013
function util.ore_workaround(event)
for i, ore in pairs(util.me.ores_for_workaround) do
if (
event.surface and
event.surface.map_gen_settings and
event.surface.map_gen_settings.autoplace_controls and
event.surface.map_gen_settings.autoplace_controls["titanium-ore"]
) then
return
end
if event.surface.name ~= "nauvis" then return end
if math.random() < settings.global[util.me.name.."-ore-workaround-probability"].value then
util.generate_ore(event, ore.name, ore.amount, ore.tiles)
end
end
end
-- The majority of this function was written by Eradicator, see https://forums.factorio.com/viewtopic.php?t=72723
function util.generate_ore(event, name, amount, tiles)
local biases = {[0] = {[0] = 1}}
local t = 1
repeat
t = t + util.grow(biases,t,tiles)
until t >= tiles
local pos = {x=event.position.x*32, y=event.position.y*32}
local multiplier = math.max(math.abs(event.position.x), math.abs(event.position.y))
if multiplier < 10 then return end -- don't generate too close to start
local total_bias = 0
for x,_ in pairs(biases) do for y,bias in pairs(_) do
total_bias = total_bias + bias
end end
for x,_ in pairs(biases) do for y,bias in pairs(_) do
local entity = {
name = name,
amount = amount * (bias/total_bias) * multiplier,
force = 'neutral',
position = {pos.x+x,pos.y+y},
}
if event.surface.can_place_entity(entity) then
event.surface.create_entity(entity)
end
end end
end
-- The majority of this function was written by Eradicator, see https://forums.factorio.com/viewtopic.php?t=72723
function util.grow(grid,t,tiles)
local w_max = 256
local h_max = 256
local abs = math.abs
local old = {}
local new_count = 0
for x,_ in pairs(grid) do for y,__ in pairs(_) do
table.insert(old,{x,y})
end end
for _,pos in pairs(old) do
local x,y = pos[1],pos[2]
local bias = grid[x][y]
for dx=-1,1,1 do for dy=-1,1,1 do
local a,b = x+dx, y+dy
if (math.random() > 0.9) and (abs(a) < w_max) and (abs(b) < h_max) then
grid[a] = grid[a] or {}
if not grid[a][b] then
grid[a][b] = 1 - (t/tiles)
new_count = new_count + 1
if (new_count+t) == tiles then return new_count end
end
end
end end
end
return new_count
end
return util

View file

@ -1,18 +1,9 @@
local util = require("control-util")
function on_console_chat(event)
if event.message and string.lower(event.message) == "bzlist" then
local player = game.players[event.player_index]
if player and player.connected then
local list = util.get_list()
if list and #list>0 then
local filename = util.me.name..".txt"
game.write_file(filename, list, false, event.player_index)
player.print("Wrote recipes to script-output/"..filename)
end
end
end
end
script.on_event(defines.events.on_console_chat, on_console_chat)
script.on_init(util.check_fluid_mining)
script.on_event(defines.events.on_console_command, util.list)
script.on_configuration_changed(util.ore_fix)
util.add_list_command_handler()
util.add_regenerate_command_handler()
util.warptorio2_expansion_helper()

View file

@ -2,12 +2,28 @@ require("carbon-recipe-final-stacking")
require("carbon-recipe-final-k2")
require("carbon-recipe-final-se")
require("carbon-recipe-final-rrr")
require("low-density-structure-nanotubes")
require("nanotubes-final")
require("compatibility/vtkdeepcoremining")
require("carbon-recipe-modules") -- Should be last import, need in both updates and final-fixes
local futil = require("util")
local util = require("data-util");
-- supercapacitors with graphene cloned from supercapacitors with activated carbon
if data.raw.recipe["supercapacitor"] then
local new_recipe = futil.table.deepcopy(data.raw.recipe["supercapacitor"])
new_recipe.name = new_recipe.name.."-graphene"
new_recipe.localised_name = {"item-name.supercapacitor"}
new_recipe.icons = {
{ icon = data.raw.item["supercapacitor"].icon, icon_size = data.raw.item["supercapacitor"].icon_size},
{ icon = "__bzcarbon__/graphics/icons/graphene.png", icon_size = 128, scale=0.125, shift= {-8, -8}, tint={1,1,1}},
}
new_recipe.icon = nil
new_recipe.icon_size = nil
data:extend({new_recipe})
util.replace_ingredient(new_recipe.name, "activated-carbon", "graphene", 1)
util.add_unlock("electromagnetic-plant", new_recipe.name)
end
-- Green circuits in final fixes due to K2 shenanigans
if mods.MDbobelectronics or mods.bobelectronics then
@ -93,34 +109,29 @@ util.remove_ingredient("electric-furnace", "cuw") -- support new tungsten
-- Vanilla burner phase tweaks -- green circuits after electronics
if not mods.Krastorio2 and not mods["aai-industry"] and not mods.bzaluminum then
util.replace_ingredient("offshore-pump", "electronic-circuit", "copper-cable")
util.replace_ingredient("lab", "electronic-circuit", "copper-cable")
util.replace_ingredient("electric-mining-drill", "electronic-circuit", "copper-cable")
util.replace_ingredient("assembling-machine-1", "electronic-circuit", "copper-plate")
util.replace_ingredient("radar", "electronic-circuit", "copper-plate")
util.replace_ingredient("splitter", "electronic-circuit", "copper-cable", 20)
util.replace_ingredient("electric-mining-drill", "electronic-circuit", "copper-cable", 6)
-- Most of this can go post 2.0
-- util.replace_ingredient("offshore-pump", "electronic-circuit", "copper-cable")
-- util.replace_ingredient("lab", "electronic-circuit", "copper-cable")
-- util.replace_ingredient("assembling-machine-1", "electronic-circuit", "copper-plate")
-- util.replace_ingredient("radar", "electronic-circuit", "copper-plate")
-- util.replace_ingredient("splitter", "electronic-circuit", "copper-cable", 20)
-- Keep repair pack raw ingredients the same:
util.remove_ingredient("repair-pack", "electronic-circuit")
util.add_ingredient("repair-pack", "copper-cable", 6)
util.set_ingredient("repair-pack", "iron-gear-wheel", 3)
-- util.remove_ingredient("repair-pack", "electronic-circuit")
-- util.add_ingredient("repair-pack", "copper-cable", 6)
-- util.set_ingredient("repair-pack", "iron-gear-wheel", 3)
util.add_effect("electronics", { type = "unlock-recipe", recipe = "electronic-circuit" })
util.add_effect("electronics", { type = "unlock-recipe", recipe = "inserter" })
util.add_effect("electronics", { type = "unlock-recipe", recipe = "long-handed-inserter" })
util.remove_recipe_effect("automation", "long-handed-inserter")
util.set_enabled("electronic-circuit", false)
util.set_enabled("inserter", false)
util.add_prerequisite("logistic-science-pack", "electronics")
-- util.add_effect("electronics", { type = "unlock-recipe", recipe = "electronic-circuit" })
-- util.add_effect("electronics", { type = "unlock-recipe", recipe = "inserter" })
-- util.add_effect("electronics", { type = "unlock-recipe", recipe = "long-handed-inserter" })
-- util.remove_recipe_effect("automation", "long-handed-inserter")
-- util.set_enabled("electronic-circuit", false)
-- util.set_enabled("inserter", false)
-- util.add_prerequisite("logistic-science-pack", "electronics")
end
if not mods["aai-industry"] then
if not mods.Krastorio2 then
util.set_enabled("electric-mining-drill", true)
end
end
if mods["aai-industry"] then
-- AAI Industry now unlocks steam much later. Move it to an earlier sensible location in the tech tree.
util.set_prerequisite("steam-power", {"basic-fluid-handling"})
@ -137,7 +148,6 @@ if mods.modmashsplintersubspacelogistics then
for i, item in pairs({"graphite", "diamond"}) do
if data.raw.item["super-container-for-"..item] then
for i, icon in pairs(data.raw.item["super-container-for-"..item].icons) do
log(serpent.dump(icon))
if string.find(icon.icon, item) then
icon.size = 128
icon.scale = icon.scale / 2
@ -164,7 +174,6 @@ if mods.modmashsplintersubspacelogistics then
end
end
for i, technology in pairs(data.raw.technology) do
log(technology.name)
if string.find(technology.name, "containment") then
if technology.icons then
for j, icon in pairs(technology.icons) do
@ -179,6 +188,9 @@ if mods.modmashsplintersubspacelogistics then
end
end
end
util.redo_recycling()
util.size_recycler_output()
util.use_fluid_mining_final()
-- Must be last
util.create_list()

View file

@ -5,22 +5,24 @@ require("carbon-matter")
require("strange-matter")
require("compatibility/248k")
require("compatibility/orewashing")
require("carbon-recipe-modules") -- Should be last import, need in both updates and final-fixes
-- require("omni")
local util = require("data-util");
util.add_gleba_rock("flake-graphite")
util.add_gleba_rock("rough-diamond", 2, 3)
if mods.Asteroid_Mining then
require("__Asteroid_Mining__.scripts.addmodule")
if util.me.use_flake_graphite() then
amfunc.addtype("flake-graphite", {a = 0,r = 0.0,g = 0.2,b = 0.5})
if util.me.use_flake_graphite() and not data.raw.item["asteroid-flake-graphite"] then
util.addtype("flake-graphite", {a = 0,r = 0.0,g = 0.2,b = 0.5})
end
if util.me.use_rough_diamond() then
amfunc.addtype("rough-diamond", {a = 0,r = 0.0,g = 0.2,b = 0.8})
if util.me.use_rough_diamond() and not data.raw.item["asteroid-rough-diamond"] then
util.addtype("rough-diamond", {a = 0,r = 0.0,g = 0.2,b = 0.8})
end
end
util.redo_recycling()
require("compatibility/crafting-efficiency")
-- Must be last
util.create_list()

File diff suppressed because it is too large Load diff

View file

@ -1,12 +1,14 @@
require("graphite")
require("graphite-particle")
require("diamond")
require("diamond-particle")
require("prototypes.basic-crusher")
require("prototypes.graphite")
require("prototypes.graphite-particle")
require("prototypes.diamond")
require("prototypes.diamond-particle")
require("carbon-recipe")
require("carbon-recipe-k2") -- must be after carbon-recipe
require("carbon-recipe-se")
require("carbon-fiber")
require("prototypes.activated-carbon")
require("prototypes.carbon-fiber")
local util = require("data-util");
@ -16,6 +18,18 @@ if mods["aai-vehicles-miner"] then
data.raw.fluid.steam.auto_barrel = true
end
util.add_fluid_mining()
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"})
util.add_prerequisite("uranium-processing", "sulfur-processing")
util.add_unlock("graphite-processing", "basic-crusher")
-- Must be last
util.create_list()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 551 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 543 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 MiB

After

Width:  |  Height:  |  Size: 2 MiB

Before After
Before After

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

Before After
Before After

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before After
Before After

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before After
Before After

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before After
Before After

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before After
Before After

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Before After
Before After

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Before After
Before After

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Before After
Before After

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Before After
Before After

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

View file

@ -1,14 +1,16 @@
{
"name": "bzcarbon",
"version": "0.5.9",
"factorio_version": "1.1",
"version": "2.0.0",
"factorio_version": "2.0",
"title": "Graphite & Diamonds",
"author": "Brevven",
"contact": "",
"homepage": "",
"dependencies": [
"base >= 1.1.0",
"? space-age",
"? bztitanium",
"? bzsilicon",
"? bzzirconium",
"? bzfoundry",
"? space-exploration",
@ -19,6 +21,6 @@
"? deadlock-beltboxes-loaders",
"? DeadlockCrating"
],
"description": "Adds elemental carbon items to the game, including graphite, diamonds, graphene, and optionally fullerenes, nanotubes, etc.\n\nCompatible with RSO, Krastorio 2, Space Exploration, and more. A standalone piece of BZ Mods"
"description": "Adds elemental carbon items to the game, including graphite, diamonds, graphene, and more.\n\nCompatible with Space Age, and more. A standalone piece of BZ Mods"
}

View file

@ -45,6 +45,7 @@ nanotubes=Ein nützliches, fortgeschrittenes Material
graphite=__ITEM__graphite__
graphite-dust=__ITEM__graphite-dust__
synthetic-diamond=__ITEM__diamond__
graphite-synthesis=Graphit-Synthese
diamond-processing=__ITEM__diamond__
graphene=__ITEM__graphene__
heavy-water-graphene=[fluid=heavy-water] mit __ITEM__graphene__
@ -53,9 +54,6 @@ nanotubes=__ITEM__nanotubes__
carbon-black=__ITEM__carbon-black__
graphite-carbon-black=__ITEM__graphite__ aus __ITEM__carbon-black__
nanomaterial-nanotubes=__ITEM__se-nanomaterial__ aus __ITEM__nanotubes__
low-density-structure=__ITEM__low-density-structure__
low-density-structure-RS=__ITEM__low-density-structure__
low-density-structure-nanotubes=__ITEM__low-density-structure__
se-low-density-structure-beryllium=__ITEM__low-density-structure__
[recipe-description]

View file

@ -8,6 +8,7 @@ flake-graphite-patch-ore=__ENTITY__flake-graphite-patch__ ore
rough-diamond-patch=__ITEM__rough-diamond__ patch
rough-diamond-patch-chunk=__ENTITY__rough-diamond-patch__ chunk
rough-diamond-patch-ore=__ENTITY__rough-diamond-patch__ ore
basic-crusher=Basic crusher
[entity-description]
wpe_broken_lab=To repair, insert 100[item=iron-plate], 100[item=iron-gear-wheel], 50[item=repair-pack]
@ -22,6 +23,7 @@ rough-diamond=Rough diamond
graphite=Graphite
graphite-dust=Graphite dust
compressed-graphite=Compressed graphite
basic-crusher=Basic crusher
diamond=Diamond
graphene=Graphene
@ -29,6 +31,7 @@ fullerenes=Fullerenes
nanotubes=Nanotubes
carbon-black=Carbon black
crucible=Crucible
activated-carbon=Activated carbon
carbon-fiber=Carbon fiber
polyacrylonitrile=Polyacrylonitrile
@ -51,31 +54,34 @@ flake-graphite-synthesis=Graphite synthesis
carbon-matter-processing=Elemental carbon conversion
enriched-graphite=Graphite enrichment
carbon-fiber=__ITEM__carbon-fiber__
fluid-mining=Fluid mining
[technology-description]
fluid-mining=Allows supply of fluids to mining drills to enable mining of certain resources.
graphite-processing=Process flake graphite into usable graphite
diamond-processing=Process or create diamonds. Used for grinding, drilling, high tech electronics, etc.
graphene=A useful nanomaterial made from simple graphite
fullerenes=Isolate fullerenes by zapping carbon
nanotubes=A useful advanced material
carbon-fiber=Created with the oils from the jellynut, polyacrylonitrile can be spun, strengthened and then woven to provide the basis for strong materials.
[recipe-name]
graphite=__ITEM__graphite__
graphite-dust=__ITEM__graphite-dust__
synthetic-diamond=__ITEM__diamond__
graphite-synthesis=Graphite synthesis
diamond-processing=__ITEM__diamond__
graphene=__ITEM__graphene__
heavy-water-graphene=[fluid=heavy-water] with __ITEM__graphene__
fullerenes=__ITEM__fullerenes
nanotubes=__ITEM__nanotubes__
carbon-black=__ITEM__carbon-black__
graphite-carbon-black=__ITEM__graphite__ from __ITEM__carbon-black__
graphite-carbon-black=Graphitization of carbon black
graphitization=Graphitization of diamonds
nanomaterial-nanotubes=__ITEM__se-nanomaterial__ from __ITEM__nanotubes__
low-density-structure=__ITEM__low-density-structure__
low-density-structure-RS=__ITEM__low-density-structure__
low-density-structure-nanotubes=__ITEM__low-density-structure__
se-low-density-structure-beryllium=__ITEM__low-density-structure__
dirty-water-filtration-graphite=Filter dirty water [item=flake-graphite]
ammonia-from-spoilage=Ammonia from spoilage
vtk-deepcore-mining-ore-chunk-refining-graphite-focus=__ITEM__graphite__ focused ore chunk refining
vtk-deepcore-mining-ore-chunk-refining-diamond-focus=__ITEM__diamond__ focused ore chunk refining
@ -84,6 +90,13 @@ vtk-deepcore-mining-diamond-chunk-refining=__ITEM__rough-diamond__ chunk refinin
[recipe-description]
graphite-carbon-black=Convert excess carbon black to graphite at an unfavorable ratio.
graphite-synthesis=Synthesize graphite from expired biomatter and other hydrocarbons
[surface-property-name]
oxygen=Atmospheric oxygen
[surface-property-unit]
oxygen=__1__ %
# Settings

View file

@ -60,6 +60,7 @@ nanotubes=有用な先進素材
graphite=__ITEM__graphite__
graphite-dust=__ITEM__graphite-dust__
synthetic-diamond=__ITEM__diamond__
graphite-synthesis=グラファイト合成
diamond-processing=__ITEM__diamond__
graphene=__ITEM__graphene__
heavy-water-graphene=[fluid=heavy-water] (__ITEM__graphene__ を使用)
@ -68,9 +69,6 @@ nanotubes=__ITEM__nanotubes__
carbon-black=__ITEM__carbon-black__
graphite-carbon-black=__ITEM__graphite__ (__ITEM__carbon-black__ から)
nanomaterial-nanotubes=__ITEM__se-nanomaterial__ (__ITEM__nanotubes__ から)
low-density-structure=__ITEM__low-density-structure__
low-density-structure-RS=__ITEM__low-density-structure__
low-density-structure-nanotubes=__ITEM__low-density-structure__
se-low-density-structure-beryllium=__ITEM__low-density-structure__
dirty-water-filtration-graphite=汚水をろ過 [item=flake-graphite]

View file

@ -45,6 +45,7 @@ nanotubes=유용한 고급 재료
graphite=__ITEM__graphite__
graphite-dust=__ITEM__graphite-dust__
synthetic-diamond=__ITEM__diamond__
graphite-synthesis=흑연 합성
diamond-processing=__ITEM__diamond__
graphene=__ITEM__graphene__
heavy-water-graphene=__ITEM__graphene__을 포함한 [fluid=heavy-water]
@ -53,9 +54,6 @@ nanotubes=__ITEM__nanotubes__
carbon-black=__ITEM__carbon-black__
graphite-carbon-black=__ITEM__carbon-black__으로부터 __ITEM__graphite__
nanomaterial-nanotubes=__ITEM__nanotubes__으로부터 __ITEM__se-nanomaterial__
low-density-structure=__ITEM__low-density-structure__
low-density-structure-RS=__ITEM__low-density-structure__
low-density-structure-nanotubes=__ITEM__low-density-structure__
se-low-density-structure-beryllium=__ITEM__low-density-structure__
[recipe-description]

View file

@ -45,6 +45,7 @@ nanotubes=Przydatny zaawansowany materiał
graphite=Grafit
graphite-dust=Pył grafitowy
synthetic-diamond=Syntetyczny diament
graphite-synthesis=Synteza grafitu
diamond-processing=Przetwarzanie diamentów
graphene=Grafen
heavy-water-graphene=[fluid=heavy-water] z grafenem

View file

@ -60,6 +60,7 @@ nanotubes=Полезный продвинутый материал.
graphite=__ITEM__graphite__
graphite-dust=__ITEM__graphite-dust__
synthetic-diamond=__ITEM__diamond__
graphite-synthesis=Синтез графита
diamond-processing=__ITEM__diamond__
graphene=__ITEM__graphene__
heavy-water-graphene=[fluid=heavy-water] с примесью графена
@ -68,9 +69,6 @@ nanotubes=__ITEM__nanotubes__
carbon-black=__ITEM__carbon-black__
graphite-carbon-black=Переработка технического углерода для получения графита
nanomaterial-nanotubes=Переработка нанотрубок для получения __ITEM__se-nanomaterial__
low-density-structure=__ITEM__low-density-structure__
low-density-structure-RS=__ITEM__low-density-structure__
low-density-structure-nanotubes=__ITEM__low-density-structure__
se-low-density-structure-beryllium=__ITEM__low-density-structure__
dirty-water-filtration-graphite=Фильтрация грязной воды [item=flake-graphite]

View file

@ -56,6 +56,7 @@ nanotubes=一种有用的高级材料
graphite=__ITEM__graphite__
graphite-dust=__ITEM__graphite-dust__
synthetic-diamond=__ITEM__diamond__
graphite-synthesis=石墨合成
diamond-processing=__ITEM__diamond__
graphene=__ITEM__graphene__
heavy-water-graphene=[fluid=heavy-water]__ITEM__graphene__
@ -64,9 +65,6 @@ nanotubes=__ITEM__nanotubes__
carbon-black=__ITEM__carbon-black__
graphite-carbon-black=__ITEM__graphite____ITEM__carbon-black__
nanomaterial-nanotubes=__ITEM__se-nanomaterial____ITEM__nanotubes__
low-density-structure=__ITEM__low-density-structure__
low-density-structure-RS=__ITEM__low-density-structure__
low-density-structure-nanotubes=__ITEM__low-density-structure__
se-low-density-structure-beryllium=__ITEM__low-density-structure__
dirty-water-filtration-graphite=过滤脏水[item=flake-graphite]
@ -111,4 +109,4 @@ bzcarbon-reuse-yes=启用
bzcarbon-reuse-no=不启用
[mod-name]
bzcarbon=BZ-石墨和金刚石
bzcarbon=BZ-石墨和金刚石

32
me.lua
View file

@ -1,6 +1,8 @@
local me = {}
me.name = "bzcarbon"
me.resources = {} -- see end of file
me.list = {}
me.recipes = { -- recipes that allow productivity
@ -22,8 +24,13 @@ me.recipes = { -- recipes that allow productivity
-- NOTE: Carbon black recipes do not allow prod modules
}
function has_mod(name)
if mods then return mods[name] end
if script.active_mods then return script.active_mods[name] end
end
function me.use_fiber()
return me.get_setting("bzcarbon-enable-carbon-fiber") == "yes"
return mods["space-age"] or me.get_setting("bzcarbon-enable-carbon-fiber") == "yes"
end
function me.use_fullerenes()
@ -42,11 +49,11 @@ function me.use_carbon_black()
end
function me.use_rough_diamond()
return mods["rso-mod"] or me.get_setting("bzcarbon-enable-rough-diamond") == "yes"
return has_mod("rso-mod") or has_mod("space-age") or me.get_setting("bzcarbon-enable-rough-diamond") == "yes"
end
function me.use_flake_graphite()
return mods["rso-mod"] or me.get_setting("bzcarbon-enable-flake-graphite") == "yes"
return has_mod("rso-mod") or me.get_setting("bzcarbon-enable-flake-graphite") == "yes"
end
function me.foundry_enable()
@ -73,15 +80,12 @@ function me.add_modified(name)
end
end
me.crucible_ingredients = {"tungsten-plate", "zirconia", "silica"}
if (mods and mods.bzaluminum) or (game and game.active_mods and game.active_mods.bzaluminum) then
table.insert(me.crucible_ingredients, "alumina")
else
table.insert(me.crucible_ingredients, "stone-brick")
end
me.crucible_ingredients = {"zirconia", "silica", "alumina", "stone-brick"}
me.furnaces = {
"electric-furnace",
"foundry", -- Space Age
"basic-foundry", -- BZ Tin
"electric-foundry", -- BZ
"industrial-furnace", -- AAI
"se-casting-machine", -- SE
@ -102,5 +106,15 @@ me.furnaces = {
"5d-industrial-furnace",
}
if me.use_flake_graphite() then
table.insert(me.resources, {"graphite", "nauvis"})
end
if me.use_rough_diamond() then
if has_mod("space-age") then
table.insert(me.resources, {"diamond", "vulcanus"})
else
table.insert(me.resources, {"diamond", "nauvis"})
end
end
return me

View file

@ -3,4 +3,5 @@ local cutil = require("carbon-util")
if util.me.use_fullerenes() then
cutil.nanotube_recipe("low-density-structure")
cutil.nanotube_recipe("space-platform-foundation")
end

View file

@ -0,0 +1,63 @@
local util = require("data-util");
if mods["space-age"] then
local precursor = "solid-fuel"
if mods["wood-industry"] then precursor = "charcoal" end
data:extend({
{
type = "item",
name = "activated-carbon",
icon = "__bzcarbon__/graphics/icons/activated-carbon.png",
icon_size = 128,
subgroup = "intermediate-product",
order = "g[activated-carbon]",
stack_size = util.get_stack_size(100),
},
{
type = "recipe",
name = "activated-carbon",
category = "chemistry",
order = "d[graphite-carbon-fiber]",
enabled = false,
energy_required = 2.5,
ingredients = data.raw.fluid["ammonia"] and
{
util.item(precursor),
util.fluid("steam"),
(mods.bztitanium or mods.bzzirconium) and util.fluid("vacuum") or nil
},
results = {
{type="item", name= "activated-carbon", amount=1},
},
},
})
if util.me.use_carbon_black() then
data:extend({
{
type = "recipe",
name = "activated-carbon-black",
localised_name = {"item-name.activated-carbon"},
icons = {
{ icon = "__bzcarbon__/graphics/icons/activated-carbon.png", icon_size = 128},
{ icon = "__bzcarbon__/graphics/icons/carbon-black.png", icon_size = 64, scale = 0.25, shift = {-8, -8}},
},
category = "chemistry",
order = "d[graphite-carbon-fiber]",
enabled = false,
energy_required = 2.5,
ingredients = data.raw.fluid["ammonia"] and
{
util.item("carbon-black", 5),
util.fluid("steam"),
(mods.bztitanium or mods.bzzirconium) and util.fluid("vacuum") or nil
},
results = {
{type="item", name= "activated-carbon", amount=1},
},
},
})
end
util.add_unlock("advanced-oil-processing", "activated-carbon")
util.add_unlock("advanced-oil-processing", "activated-carbon-black")
util.add_ingredient("supercapacitor", "activated-carbon", 10)
end

View file

@ -0,0 +1,184 @@
local futil = require("util")
local util = require("data-util");
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
-- 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")
graphics.integration_patch.north.scale = graphics.integration_patch.north.scale * 0.5
graphics.integration_patch.east.scale = graphics.integration_patch.east.scale * 0.5
graphics.integration_patch.south.scale = graphics.integration_patch.south.scale * 0.5
graphics.integration_patch.west.scale = graphics.integration_patch.west.scale * 0.5
graphics.animation.north.layers[1].scale = graphics.animation.north.layers[1].scale * 0.5
graphics.animation.north.layers[2].scale = graphics.animation.north.layers[2].scale * 0.5
graphics.animation.south.layers[1].scale = graphics.animation.south.layers[1].scale * 0.5
graphics.animation.south.layers[2].scale = graphics.animation.south.layers[2].scale * 0.5
graphics.animation.east.layers[1].scale = graphics.animation.east.layers[1].scale * 0.5
graphics.animation.east.layers[2].scale = graphics.animation.east.layers[2].scale * 0.5
graphics.animation.west.layers[1].scale = graphics.animation.west.layers[1].scale * 0.5
graphics.animation.west.layers[2].scale = graphics.animation.west.layers[2].scale * 0.5
graphics.working_visualisations.layers.north_animation.scale = graphics.working_visualisations.layers.north_animation.scale * 0.5
graphics.working_visualisations.layers.east_animation.scale = graphics.working_visualisations.layers.east_animation.scale * 0.5
graphics.working_visualisations.layers.south_animation.scale = graphics.working_visualisations.layers.south_animation.scale * 0.5
graphics.working_visualisations.layers.west_animation.scale = graphics.working_visualisations.layers.west_animation.scale * 0.5
graphics.integration_patch.north.shift[1] = graphics.integration_patch.north.shift[1] * 0.5
graphics.integration_patch.north.shift[2] = graphics.integration_patch.north.shift[2] * 0.5
graphics.integration_patch.south.shift[1] = graphics.integration_patch.south.shift[1] * 0.5
graphics.integration_patch.south.shift[2] = graphics.integration_patch.south.shift[2] * 0.5
graphics.integration_patch.east.shift[1] = graphics.integration_patch.east.shift[1] * 0.5
graphics.integration_patch.east.shift[2] = graphics.integration_patch.east.shift[2] * 0.5
graphics.integration_patch.west.shift[1] = graphics.integration_patch.west.shift[1] * 0.5
graphics.integration_patch.west.shift[2] = graphics.integration_patch.west.shift[2] * 0.5
graphics.animation.north.layers[1].shift[1] = graphics.animation.north.layers[1].shift[1] * 0.5
graphics.animation.north.layers[1].shift[2] = graphics.animation.north.layers[1].shift[2] * 0.5
graphics.animation.north.layers[2].shift[1] = graphics.animation.north.layers[2].shift[1] * 0.5
graphics.animation.north.layers[2].shift[2] = graphics.animation.north.layers[2].shift[2] * 0.5
graphics.animation.south.layers[1].shift[1] = graphics.animation.south.layers[1].shift[1] * 0.5
graphics.animation.south.layers[1].shift[2] = graphics.animation.south.layers[1].shift[2] * 0.5
graphics.animation.south.layers[2].shift[1] = graphics.animation.south.layers[2].shift[1] * 0.5
graphics.animation.south.layers[2].shift[2] = graphics.animation.south.layers[2].shift[2] * 0.5
graphics.animation.east.layers[1].shift[1] = graphics.animation.east.layers[1].shift[1] * 0.5
graphics.animation.east.layers[1].shift[2] = graphics.animation.east.layers[1].shift[2] * 0.5
graphics.animation.east.layers[2].shift[1] = graphics.animation.east.layers[2].shift[1] * 0.5
graphics.animation.east.layers[2].shift[2] = graphics.animation.east.layers[2].shift[2] * 0.5
graphics.animation.west.layers[1].shift[1] = graphics.animation.west.layers[1].shift[1] * 0.5
graphics.animation.west.layers[1].shift[2] = graphics.animation.west.layers[1].shift[2] * 0.5
graphics.animation.west.layers[2].shift[1] = graphics.animation.west.layers[2].shift[1] * 0.5
graphics.animation.west.layers[2].shift[2] = graphics.animation.west.layers[2].shift[2] * 0.5
graphics.working_visualisations.layers.north_animation.shift[1] = graphics.working_visualisations.layers.north_animation.shift[1] * 0.5
graphics.working_visualisations.layers.north_animation.shift[2] = graphics.working_visualisations.layers.north_animation.shift[2] * 0.5
graphics.working_visualisations.layers.south_animation.shift[1] = graphics.working_visualisations.layers.south_animation.shift[1] * 0.5
graphics.working_visualisations.layers.south_animation.shift[2] = graphics.working_visualisations.layers.south_animation.shift[2] * 0.5
graphics.working_visualisations.layers.east_animation.shift[1] = graphics.working_visualisations.layers.east_animation.shift[1] * 0.5
graphics.working_visualisations.layers.east_animation.shift[2] = graphics.working_visualisations.layers.east_animation.shift[2] * 0.5
graphics.working_visualisations.layers.west_animation.shift[1] = graphics.working_visualisations.layers.west_animation.shift[1] * 0.5
graphics.working_visualisations.layers.west_animation.shift[2] = graphics.working_visualisations.layers.west_animation.shift[2] * 0.5
util.add_new_crafting_category("basic-crushing", true)
data:extend({
{
type = "item",
name = "basic-crusher",
icon = "__space-age__/graphics/icons/crusher.png",
subgroup = "production-machine",
order = "s[crusher]",
inventory_move_sound = item_sounds.drill_inventory_move,
pick_sound = item_sounds.drill_inventory_pickup,
drop_sound = item_sounds.drill_inventory_move,
place_result = "basic-crusher",
stack_size = 10,
weight = 50*kg
},
{
type = "furnace",
name = "basic-crusher",
source_inventory_size = 1,
result_inventory_size = 1,
icon = "__space-age__/graphics/icons/crusher.png",
flags = {"placeable-neutral", "placeable-player", "player-creation"},
minable = {mining_time = 0.5, result = "basic-crusher"},
-- fast_replaceable_group = "",
max_health = 350,
corpse = "electric-furnace-remnants",
dying_explosion = "electric-furnace-explosion",
circuit_wire_max_distance = 9,
circuit_connector = circuit_connector_definitions["crusher"],
resistances =
{
{
type = "fire",
percent = 80
}
},
collision_box = {{-0.4, -0.8}, {0.4, 0.8}},
-- collision_box = {{-0.7, -1.2}, {0.7, 1.2}},
surface_conditions =
{
{
property = "gravity",
min = 0.1,
-- max =
}
},
selection_box = {{-.5, -1}, {.5, 1}},
damaged_trigger_effect = hit_effects.entity(),
module_slots = 0,
icons_positioning =
{
{inventory_index = defines.inventory.furnace_modules, shift = {0, 0.3}}
},
icon_draw_specification = { scale=0.5},
allowed_effects = {"consumption", "speed", "productivity", "pollution", "quality"},
crafting_categories = {"basic-crushing"},
crafting_speed = 2,
energy_usage = "100kW",
heating_energy = "200kW",
energy_source =
{
type = "electric",
usage_priority = "secondary-input",
emissions_per_minute = { pollution = 1 }
},
open_sound = sounds.electric_large_open,
close_sound = sounds.electric_large_close,
working_sound =
{
sound =
{
filename = "__space-age__/sound/entity/crusher/crusher-loop.ogg",
volume = 0.8
},
audible_distance_modifier = 0.6,
fade_in_ticks = 4,
fade_out_ticks = 20,
max_sounds_per_type = 3
},
graphics_set = graphics,
water_reflection =
{
pictures =
{
filename = "__space-age__/graphics/entity/crusher/crusher-reflection.png",
priority = "extra-high",
width = 24,
height = 24,
shift = futil.by_pixel(5, 40-32),
variation_count = 1,
scale = 5
},
rotate = false,
orientation_to_variation = false
}
},
{
type = "recipe",
name = "basic-crusher",
enabled = false,
ingredients =
{
{type = "item", name = "steel-plate", amount = 10},
{type = "item", name = "iron-plate", amount = 10},
{type = "item", name = "iron-gear-wheel", amount = 10},
},
energy_required = 2.5,
results = {{type="item", name="basic-crusher", amount=1}}
},
})
if mods["aai-industry"] then
util.add_unlock("sand-processing", "basic-crusher")
util.add_prerequisite("sand-processing", "steel-processing")
else
util.add_unlock("automation-2", "basic-crusher")
end
util.add_prerequisite("silica-processing", "automation-2")
end
-- For graphite we can't have steel as an ingredient.
util.remove_ingredient("basic-crusher", "steel-plate")
util.add_to_ingredient("basic-crusher", "iron-plate", 20)

123
prototypes/carbon-fiber.lua Normal file
View file

@ -0,0 +1,123 @@
local util = require("data-util");
if util.me.use_fiber() then
if mods["space-age"] then
-- ammonia from spoilage for polyacrylonitrile and for graphene
data:extend({
{
type = "recipe",
name = "ammonia-from-spoilage",
category = "organic",
icons = {
{icon = "__space-age__/graphics/icons/fluid/ammonia.png", icon_size = 64},
{icon = "__space-age__/graphics/icons/spoilage.png", icon_size = 64, scale= 0.25, shift = {-8,-8}},
},
enabled = false,
energy_required = 5,
ingredients = {
util.item("spoilage", 1),
},
results = {
util.fluid("ammonia", 10),
},
}
})
end
data:extend({
{
type = "item",
name = "polyacrylonitrile",
icon = "__bzcarbon__/graphics/icons/pan.png",
icon_size = 128,
subgroup = "intermediate-product",
order = "g[graphite-acrylic-fiber]",
stack_size = util.get_stack_size(100),
},
{
type = "recipe",
name = "polyacrylonitrile",
category = "chemistry",
order = "d[graphite-carbon-fiber]",
enabled = false,
energy_required = 1,
ingredients = data.raw.fluid["ammonia"] and
{
{type="fluid", name="petroleum-gas", amount=5},
{type="fluid", name="ammonia", amount=5},
} or {
{type="fluid", name="petroleum-gas", amount=10},
},
results = {
{type="item", name= "polyacrylonitrile", amount=1},
},
},
})
if mods["space-age"] then
util.set_category("polyacrylonitrile", "organic")
util.remove_ingredient("polyacrylonitrile", "petroleum-gas")
util.add_ingredient("polyacrylonitrile", "jelly", 10)
util.add_ingredient("polyacrylonitrile", "jelly", 10)
util.add_ingredient("polyacrylonitrile", "ammonia", 10)
util.add_ingredient("carbon-fiber", "ammonia", 10)
util.replace_ingredient("carbon-fiber", "carbon", "polyacrylonitrile")
util.set_item_icons("carbon-fiber", { {icon = "__bzcarbon__/graphics/icons/carbon-fiber.png", icon_size = 128,} })
util.add_unlock("biochamber", "ammonia-from-spoilage")
else
data:extend({
{
type = "item",
name = "carbon-fiber",
icon = "__bzcarbon__/graphics/icons/carbon-fiber.png",
icon_size = 128,
subgroup = "intermediate-product",
order = "g[graphite-carbon-fiber]",
stack_size = util.get_stack_size(100),
},
{
type = "recipe",
name = "carbon-fiber",
category = "advanced-crafting",
order = "d[graphite-carbon-fiber]",
enabled = false,
energy_required = 24,
ingredients = {
{type="fluid", name="epoxy", amount = 20},
{"plastic-bar", 2},
{"polyacrylonitrile", 4},
},
results = {
{type="item", name= "carbon-fiber", amount=8},
},
},
})
data:extend({
{
type = "technology",
name = "carbon-fiber",
icon_size = 256,
icon = "__bzcarbon__/graphics/technology/carbon-fiber.png",
effects = {
{type="unlock-recipe", recipe="polyacrylonitrile"},
{type="unlock-recipe", recipe="carbon-fiber"},
},
unit =
{
count = 30,
ingredients =
{
{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
},
time = 10,
},
prerequisites = {"chemical-science-pack", "plastics"},
order = "b-b"
},
})
util.replace_some_ingredient("carbon-fiber", "plastic", 1, "silica", 2, {force=true})
util.add_prerequisite("low-density-structure", "carbon-fiber")
util.add_prerequisite("exoskeleton-equipment", "carbon-fiber")
util.add_prerequisite("military-3", "carbon-fiber")
end
end

View file

@ -1,26 +1,35 @@
local resource_autoplace = require('resource-autoplace');
local noise = require('noise');
local util = require("data-util");
if util.me.use_rough_diamond() then
local planet = mods["space-age"] and "vulcanus" or "nauvis"
resource_autoplace.initialize_patch_set("diamond", true)
data.raw.planet[planet].map_gen_settings.autoplace_controls["diamond"] = {}
data.raw.planet[planet].map_gen_settings.autoplace_settings.entity.settings["diamond"] = {}
if mods.tenebris then
data.raw.planet.tenebris.map_gen_settings.autoplace_controls["diamond"] = {}
data.raw.planet.tenebris.map_gen_settings.autoplace_settings.entity.settings["diamond"] = {}
end
data:extend({
{
type = "autoplace-control",
category = "resource",
name = "diamond",
richness = true,
order = "b-e"
},
{
type = "noise-layer",
name = "diamond"
order = mods["space-age"] and "b-d-a" or "a-g",
},
-- {
-- type = "noise-layer",
-- name = "diamond"
-- },
{
type = "resource",
icon_size = 64, icon_mipmaps = 3,
name = "diamond",
icon = "__bzcarbon__/graphics/icons/rough-diamond.png",
icon_size = 128,
flags = {"placeable-neutral"},
order="a-b-a",
map_color = {r=0.30, g=0.54, b=0.92},
@ -35,45 +44,38 @@ data:extend({
autoplace = resource_autoplace.resource_autoplace_settings{
name = "diamond",
order = "b-z",
base_density = 0.5,
base_spots_per_km2 = 0.5,
has_starting_area_placement = false,
regular_rq_factor_multiplier = 0.6,
order = mods["space-age"] and "b-d-a" or "a-g",
base_density = mods["space-age"] and 6 or 0.5,
base_spots_per_km2 = mods["space-age"] and 1.3 or 0.5,
has_starting_area_placement = not not mods["space-age"],
regular_rq_factor_multiplier = mods["space-age"] and 1 or 0.6,
},
stage_counts = {15000, 9500, 5500, 2900, 1300, 400, 150, 80},
stages =
{
sheet =
{
filename = "__bzcarbon__/graphics/entity/ores/diamond.png",
priority = "extra-high",
size = 64,
frame_count = 8,
variation_count = 8,
hr_version =
stages =
{
sheet =
{
filename = "__bzcarbon__/graphics/entity/ores/hr-diamond.png",
filename = "__bzcarbon__/graphics/entity/ores/hr-diamond.png",
priority = "extra-high",
size = 128,
frame_count = 8,
variation_count = 8,
scale = 0.5
}
}
},
},
{
type = "item",
name = "rough-diamond",
icon_size = 64, icon_mipmaps = 3,
icon_size = 128,
icon = "__bzcarbon__/graphics/icons/rough-diamond.png",
pictures = {
{filename="__bzcarbon__/graphics/icons/rough-diamond.png", size=64, scale=0.25},
{filename="__bzcarbon__/graphics/icons/rough-diamond-1.png", size=64, scale=0.25},
{filename="__bzcarbon__/graphics/icons/rough-diamond-2.png", size=64, scale=0.25},
{filename="__bzcarbon__/graphics/icons/rough-diamond-3.png", size=64, scale=0.25},
{filename="__bzcarbon__/graphics/icons/rough-diamond.png", size=128, scale=0.25},
{filename="__bzcarbon__/graphics/icons/rough-diamond-1.png", size=128, scale=0.25},
{filename="__bzcarbon__/graphics/icons/rough-diamond-2.png", size=128, scale=0.25},
{filename="__bzcarbon__/graphics/icons/rough-diamond-3.png", size=128, scale=0.25},
{filename="__bzcarbon__/graphics/icons/rough-diamond-4.png", size=128, scale=0.25},
},
subgroup = "raw-resource",
order = "t-c-a",

View file

@ -8,135 +8,71 @@ data:extend(
pictures =
{
{
filename = "__bzcarbon__/graphics/entity/particle/graphite-particle-1.png",
priority = "extra-high",
width = 16,
height = 16,
frame_count = 1,
hr_version =
{
filename = "__bzcarbon__/graphics/entity/particle/hr-graphite-particle-1.png",
priority = "extra-high",
width = 32,
height = 32,
frame_count = 1,
scale = 0.5
}
},
{
filename = "__bzcarbon__/graphics/entity/particle/graphite-particle-2.png",
priority = "extra-high",
width = 16,
height = 16,
frame_count = 1,
hr_version =
{
filename = "__bzcarbon__/graphics/entity/particle/hr-graphite-particle-2.png",
priority = "extra-high",
width = 32,
height = 32,
frame_count = 1,
scale = 0.5
}
},
{
filename = "__bzcarbon__/graphics/entity/particle/graphite-particle-3.png",
priority = "extra-high",
width = 16,
height = 16,
frame_count = 1,
hr_version =
{
filename = "__bzcarbon__/graphics/entity/particle/hr-graphite-particle-3.png",
priority = "extra-high",
width = 32,
height = 32,
frame_count = 1,
scale = 0.5
}
},
{
filename = "__bzcarbon__/graphics/entity/particle/graphite-particle-4.png",
priority = "extra-high",
width = 16,
height = 16,
frame_count = 1,
hr_version =
{
filename = "__bzcarbon__/graphics/entity/particle/hr-graphite-particle-4.png",
priority = "extra-high",
width = 32,
height = 32,
frame_count = 1,
scale = 0.5
}
}
},
shadows =
{
{
filename = "__bzcarbon__/graphics/entity/particle/graphite-particle-shadow-1.png",
priority = "extra-high",
width = 16,
height = 16,
frame_count = 1,
hr_version =
{
filename = "__bzcarbon__/graphics/entity/particle/hr-graphite-particle-shadow-1.png",
priority = "extra-high",
width = 32,
height = 32,
frame_count = 1,
scale = 0.5
}
},
{
filename = "__bzcarbon__/graphics/entity/particle/graphite-particle-shadow-2.png",
priority = "extra-high",
width = 16,
height = 16,
frame_count = 1,
hr_version =
{
filename = "__bzcarbon__/graphics/entity/particle/hr-graphite-particle-shadow-2.png",
priority = "extra-high",
width = 32,
height = 32,
frame_count = 1,
scale = 0.5
}
},
{
filename = "__bzcarbon__/graphics/entity/particle/graphite-particle-shadow-3.png",
priority = "extra-high",
width = 16,
height = 16,
frame_count = 1,
hr_version =
{
filename = "__bzcarbon__/graphics/entity/particle/hr-graphite-particle-shadow-3.png",
priority = "extra-high",
width = 32,
height = 32,
frame_count = 1,
scale = 0.5
}
},
{
filename = "__bzcarbon__/graphics/entity/particle/graphite-particle-shadow-4.png",
priority = "extra-high",
width = 16,
height = 16,
frame_count = 1,
hr_version =
{
filename = "__bzcarbon__/graphics/entity/particle/hr-graphite-particle-shadow-4.png",
priority = "extra-high",
width = 32,
height = 32,
frame_count = 1,
scale = 0.5
}
}
}
}

View file

@ -1,8 +1,16 @@
local resource_autoplace = require('resource-autoplace');
local noise = require('noise');
local util = require("data-util");
resource_autoplace.initialize_patch_set("graphite", true)
data.raw.planet.nauvis.map_gen_settings.autoplace_controls["graphite"] = {}
data.raw.planet.nauvis.map_gen_settings.autoplace_settings.entity.settings["graphite"] = {}
if mods.tenebris then
data.raw.planet.tenebris.map_gen_settings.autoplace_controls["graphite"] = {}
data.raw.planet.tenebris.map_gen_settings.autoplace_settings.entity.settings["graphite"] = {}
end
if util.me.use_flake_graphite() then
data:extend({
{
@ -10,17 +18,17 @@ data:extend({
category = "resource",
name = "graphite",
richness = true,
order = "b-e"
},
{
type = "noise-layer",
name = "graphite"
order = "a-g"
},
-- {
-- type = "noise-layer",
-- name = "graphite"
-- },
{
type = "resource",
icon_size = 64, icon_mipmaps = 3,
name = "graphite",
icon = "__bzcarbon__/graphics/icons/flake-graphite.png",
icon_size = 128,
flags = {"placeable-neutral"},
order="a-b-a",
map_color = {r=0.18, g=0.17, b=0.30},
@ -38,7 +46,7 @@ data:extend({
autoplace = resource_autoplace.resource_autoplace_settings{
name = "graphite",
order = "b-z",
order = "a-g",
base_density = 6,
base_spots_per_km2 = 1,
has_starting_area_placement = true,
@ -47,37 +55,30 @@ data:extend({
},
stage_counts = {15000, 9500, 5500, 2900, 1300, 400, 150, 80},
stages =
{
sheet =
{
filename = "__bzcarbon__/graphics/entity/ores/graphite.png",
priority = "extra-high",
size = 64,
frame_count = 8,
variation_count = 8,
hr_version =
stages =
{
sheet =
{
filename = "__bzcarbon__/graphics/entity/ores/hr-graphite.png",
filename = "__bzcarbon__/graphics/entity/ores/hr-graphite.png",
priority = "extra-high",
size = 128,
frame_count = 8,
variation_count = 8,
scale = 0.5
}
}
},
},
{
type = "item",
name = "flake-graphite",
icon_size = 64, icon_mipmaps = 3,
icon_size = 128,
icon = "__bzcarbon__/graphics/icons/flake-graphite.png",
pictures = {
{filename="__bzcarbon__/graphics/icons/flake-graphite.png", size=64, scale=0.25},
{filename="__bzcarbon__/graphics/icons/flake-graphite-1.png", size=64, scale=0.25},
{filename="__bzcarbon__/graphics/icons/flake-graphite-2.png", size=64, scale=0.25},
{filename="__bzcarbon__/graphics/icons/flake-graphite-3.png", size=64, scale=0.25},
{filename="__bzcarbon__/graphics/icons/flake-graphite.png", size=128, scale=0.25},
{filename="__bzcarbon__/graphics/icons/flake-graphite-1.png", size=128, scale=0.25},
{filename="__bzcarbon__/graphics/icons/flake-graphite-2.png", size=128, scale=0.25},
{filename="__bzcarbon__/graphics/icons/flake-graphite-3.png", size=128, scale=0.25},
{filename="__bzcarbon__/graphics/icons/flake-graphite-4.png", size=128, scale=0.25},
},
subgroup = "raw-resource",
order = "t-c-a",

View file

@ -23,15 +23,6 @@ data:extend({
allowed_values = {"no", "yes"},
order = "b2",
},
{
type = "string-setting",
name = "bzcarbon-enable-rough-diamond",
setting_type = "startup",
hidden = not not mods["rso-mod"],
default_value = mods["rso-mod"] and "yes" or "no",
allowed_values = {"no", "yes"},
order = "d1",
},
{
type = "string-setting",
name = "bzcarbon-enable-flake-graphite",
@ -58,6 +49,19 @@ data:extend({
},
})
if not mods["space-age"] and not mods["rso-mod"] then
data:extend({
{
type = "string-setting",
name = "bzcarbon-enable-rough-diamond",
setting_type = "startup",
hidden = not not mods["rso-mod"],
default_value = mods["rso-mod"] and "yes" or "no",
allowed_values = {"no", "yes"},
order = "d1",
},
})
end
if mods.bzchlorine then
data:extend({
{