new feature: reuse diamonds

This commit is contained in:
Brevven 2022-01-13 22:44:57 -08:00
parent b35ee619de
commit b618a31bc2
10 changed files with 51 additions and 9 deletions

View file

@ -89,10 +89,16 @@ else
util.add_ingredient("effectivity-module-2", "diamond", 1)
util.add_ingredient("productivity-module-2", "diamond", 1)
end
util.add_ingredient("laser-turret", "diamond", 1)
util.add_ingredient("assembling-machine-3", "diamond", 4)
util.add_ingredient("low-density-structure", "diamond", 1)
util.add_ingredient("se-low-density-structure-beryllium", "diamond", 1)
util.add_ingredient("laser-turret", "diamond", 1)
if util.me.reuse() then
util.add_product("low-density-structure", {type="item", name="diamond", amount=1, probability = 0.5})
util.add_product("low-density-structure-nanotubes", {type="item", name="diamond", amount=1, probability = 0.5})
util.add_product("se-low-density-structure-beryllium", {type="item", name="diamond", amount=1, probability = 0.5})
end
if mods.Krastorio2 then
util.replace_some_ingredient("steel-plate", "iron-plate", 2, "graphite", 4)

View file

@ -403,12 +403,12 @@ data:extend({
{ icon = "__bzcarbon__/graphics/icons/nanotube.png", icon_size = 128, scale=0.125, shift= {-8, -8}},
},
category = "advanced-crafting",
subgroup = data.raw.item["low-density-structure"].subgroup,
order = "o[low-density-structure-nanotubes]",
enabled = false,
energy_required = 20,
ingredients = lds_recipe(),
result = "low-density-structure",
result_count = 1,
results = {{"low-density-structure", 1}},
},
{
type = "technology",
@ -461,8 +461,7 @@ data:extend({
type = "item",
name = "carbon-black",
icon = "__bzcarbon__/graphics/icons/carbon-black.png",
icon_size = 64,
icon_mipmaps = 3,
icon_size = 64, icon_mipmaps = 3,
subgroup = "intermediate-product",
order = "g[graphite-carbon-black]",
stack_size = util.get_stack_size(100),
@ -470,6 +469,8 @@ data:extend({
{
type = "recipe",
name = "carbon-black",
icon = "__bzcarbon__/graphics/icons/carbon-black.png",
icon_size = 64, icon_mipmaps = 3,
category = "chemistry",
order = "d[graphite-carbon-black]",
enabled = false,
@ -477,8 +478,9 @@ data:extend({
ingredients = {
{type="item", name="coal", amount=1},
},
result = "carbon-black",
result_count = 1,
results = {
{type="item", name= "carbon-black", amount=1},
}
},
{
type = "recipe",
@ -500,6 +502,7 @@ data:extend({
})
end
-- crucible
data:extend({
{
type = "item",

View file

@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 0.0.15
Date: 2022-01-13
Features:
- Setting to enable reusing diamond grinding grit for LDS recipes
---------------------------------------------------------------------------------------------------
Version: 0.0.14
Date: 2022-01-12
Changes:

View file

@ -8,7 +8,6 @@ local util = require("data-util");
-- Green circuits in final fixes due to K2 shenanigans
if not mods.MDbobelectronics then
util.replace_some_ingredient("electronic-circuit", "copper-cable", 1, "graphite", 1)
-- AAI alternate green circuit
@ -18,6 +17,20 @@ else
util.replace_ingredient("basic-electronic-component", "coke", "graphite")
end
if data.raw.recipe["low-density-structure"] and
not data.raw.recipe["low-density-structure"].icon and
not data.raw.recipe["low-density-structure"].icons
then
util.set_subgroup("low-density-structure", data.raw.item["low-density-structure"].subgroup)
util.set_icons("low-density-structure", {
{ icon = "__base__/graphics/icons/low-density-structure.png", icon_size = 64, icon_mipmaps = 4},
})
util.set_subgroup("se-low-density-structure-beryllium", data.raw.item["low-density-structure"].subgroup)
util.set_icons("se-low-density-structure-beryllium", {
{ icon = "__base__/graphics/icons/low-density-structure.png", icon_size = 64, icon_mipmaps = 4},
})
end
-- Only electric smelters can make Diamonds
function diamondsInElectricSmelter(entity)
@ -47,6 +60,7 @@ for i, furnace in pairs(util.me.furnaces) do
end
end
-- Vanilla burner phase tweaks -- green circuits after electronics
if not mods.Krastorio2 and not mods["aai-industry"] then
util.replace_ingredient("offshore-pump", "electronic-circuit", "copper-cable")
util.replace_ingredient("lab", "electronic-circuit", "copper-cable")

Binary file not shown.

View file

@ -1,6 +1,6 @@
{
"name": "bzcarbon",
"version": "0.0.14",
"version": "0.0.15",
"factorio_version": "1.1",
"title": "Graphite & Diamonds",
"author": "Brevven",

View file

@ -65,6 +65,7 @@ bzcarbon-list=Make a list of modified recipes
bzcarbon-enable-fullerenes=Enable fullerenes & nanotubes
bzcarbon-enable-carbon-black=Enable carbon black
bzcarbon-enable-rough-diamond=Enable diamond mining
bzcarbon-reuse=Reuse grinding grit
[mod-setting-description]
bzcarbon-recipe-bypass=Skip modifying these recipes (comma-separated list).
@ -72,3 +73,4 @@ bzcarbon-list=If enabled, the text command [color=orange]BZList[/color] will dum
bzcarbon-enable-fullerenes=Enable the fullerenes & nanotubes intermediate products.\nFullerenes are used primarily in bio-related things. Nanotubes for structures.
bzcarbon-enable-carbon-black=Enable carbon black byproduct. Primarily used to make plastics.
bzcarbon-enable-rough-diamond=Enables diamond ore patches for new games.
bzcarbon-reuse=A chance to reuse diamond grinding grit in recipes like LDS. More complex, but saves resources.

5
me.lua
View file

@ -7,6 +7,11 @@ function me.use_fullerenes()
return me.get_setting("bzcarbon-enable-fullerenes") == "yes"
end
function me.reuse()
return me.get_setting("bzcarbon-reuse") == "yes"
end
function me.use_carbon_black()
return me.get_setting("bzcarbon-enable-carbon-black") == "yes"
end

View file

@ -33,4 +33,11 @@ data:extend({
setting_type = "startup",
default_value = false,
},
{
type = "string-setting",
name = "bzcarbon-reuse",
setting_type = "startup",
default_value = "no",
allowed_values = {"no", "yes"},
},
})

Binary file not shown.