lds/srp fixes, tech tree tweaks

This commit is contained in:
Brevven 2022-01-20 00:37:33 -08:00
parent 9b8309ebe5
commit cb2d4cb2b3
6 changed files with 72 additions and 44 deletions

View file

@ -2,10 +2,10 @@ require("carbon-recipe-final-stacking")
require("carbon-recipe-final-k2")
require("carbon-recipe-final-se")
require("carbon-recipe-final-rrr")
require("carbon-recipe-modules") -- Should be last import
require("low-density-structure-nanotubes")
require("carbon-recipe-modules") -- Should be last import, need in both updates and final-fixes
local util = require("data-util");
local futil = require("util")
-- Green circuits in final fixes due to K2 shenanigans
@ -36,56 +36,26 @@ if data.raw.recipe["low-density-structure"] and
})
end
if util.me.use_fullerenes() then
data:extend({
{
type = "recipe",
name = "low-density-structure-nanotubes",
icons = {
{ icon = "__base__/graphics/icons/low-density-structure.png", icon_size = 64, icon_mipmaps = 4},
{ 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]",
normal = {
enabled = false,
energy_required = 20,
results = {{"low-density-structure", 2}},
ingredients = {
{"nanotubes", 2},
table.unpack(futil.table.deepcopy(data.raw.recipe["low-density-structure"].normal.ingredients)),
},
},
expensive = {
enabled = false,
energy_required = 20,
results = {{"low-density-structure", 2}},
ingredients = {
{"nanotubes", 2},
table.unpack(futil.table.deepcopy(data.raw.recipe["low-density-structure"].expensive.ingredients)),
},
},
},
})
if util.me.reuse() then
util.add_product("low-density-structure-nanotubes", {type="item", name="diamond", amount=1, probability = 0.5})
end
end
-- Only electric smelters can make Diamonds
function diamondsInElectricSmelter(entity)
if entity.energy_source.type == "electric" then
local isSmelter = false
local isSmelterRS = false
for j, category in pairs(entity.crafting_categories) do
if category == "smelting" then
isSmelter = true
end
if category == "smelting-RS" then
isSmelterRS = true
end
end
if isSmelter then
table.insert(entity.crafting_categories,"diamond-synthesis")
end
if isSmelterRS then
table.insert(entity.crafting_categories,"diamond-synthesis-RS")
end
end
end
for i, entity in pairs(data.raw.furnace) do