diff --git a/lead-recipe-final-5d.lua b/lead-recipe-final-5d.lua index 16eeb6c..7694bb4 100644 --- a/lead-recipe-final-5d.lua +++ b/lead-recipe-final-5d.lua @@ -1,6 +1,7 @@ local util = require("__bzlead__.data-util"); if mods["5dim_core"] then +local leb = util.me.more_entities() and "lead-expansion-bolt" or "lead-plate" data.raw.item["lead-plate"].subgroup = "plates-plates" data.raw.recipe["lead-plate"].subgroup = "plates-plates" @@ -19,9 +20,10 @@ if mods["5dim_core"] then icon_size = 64, icon_mipmaps = 3, enabled = true, energy_required = 65, - ingredients = {{"lead-ore", 85}}, - result = util.me.lead_plate, - result_count = 100, + ingredients = {util.item("lead-ore", 85)}, + results = {util.item(util.me.lead_plate, 100)}, + main_product = util.me.lead_plate, + localised_name = {"item-name.lead-plate"}, } }) @@ -48,13 +50,16 @@ if mods["5dim_core"] then energy_required = 3.2, enabled = true, ingredients = { - {"lead-dust", 1} + util.item("lead-dust", 1) }, - result = util.me.lead_plate + results = {util.item(util.me.lead_plate)}, + main_product = util.me.lead_plate, + localised_name = {"item-name.lead-plate"}, }, { type = "recipe", name = "lead-dust", + main_product = "lead-dust", icon = "__bzlead__/graphics/icons/lead-powder.png", icon_size = 64, icon_mipmaps = 3, category = "mashering", @@ -63,7 +68,7 @@ if mods["5dim_core"] then energy_required = 3.2, enabled = true, ingredients = { - {"lead-ore", 1} + util.item("lead-ore", 1) }, results = { {type="item", name = "lead-dust", amount=2}, @@ -79,9 +84,9 @@ if mods["5dim_core"] then icon_size = 64, icon_mipmaps = 3, enabled = true, energy_required = 65, - ingredients = {{"lead-dust", 85}}, - result = util.me.lead_plate, - result_count = 100, + ingredients = {util.item("lead-dust", 85)}, + results = {util.item(util.me.lead_plate, 100)}, + localised_name = {"item-name.lead-plate"}, } }) local mks = {"01", "02", "03", "04", "05", "06", "07", "08", "09", "10"} @@ -98,7 +103,17 @@ if mods["5dim_core"] then local items = {"5d-substation-", "5d-big-electric-pole-", "5d-solar-panel-"} for i, mk in pairs(mks) do for j, item in pairs(items) do - util.add_ingredient(item..mk, "lead-plate", 2) + util.add_ingredient(item..mk, leb, 2) + end + end + end + + if mods["5dim_energy"] then + local mks = {"02", "03", "04", "05", "06", "07", "08", "09", "10"} + local items = {"5d-solar-panel-"} + for i, mk in pairs(mks) do + for j, item in pairs(items) do + util.replace_ingredient(item..mk, "copper-plate", "lead-plate") end end end @@ -108,9 +123,9 @@ if mods["5dim_core"] then local items = {"5d-gun-turret-", "5d-gun-turret-big-", "5d-gun-turret-small-"} for i, mk in pairs(mks) do for j, item in pairs(items) do - util.replace_some_ingredient(item..mk, "iron-plate", 2, "lead-plate", 2) + util.replace_some_ingredient(item..mk, "iron-plate", 2, leb, 2) end - util.replace_some_ingredient("5d-gun-turret-sniper-"..mk, "steel-plate", 1, "lead-plate", 1) + util.replace_some_ingredient("5d-gun-turret-sniper-"..mk, "steel-plate", 1, leb, 1) end end diff --git a/lead-recipe-updates.lua b/lead-recipe-updates.lua index 7ba2523..e2d3833 100644 --- a/lead-recipe-updates.lua +++ b/lead-recipe-updates.lua @@ -2,6 +2,16 @@ -- local util = require("__bzlead__.data-util"); +local leb = util.me.more_entities() and "lead-expansion-bolt" or "lead-plate" + +if util.me.more_entities() then + util.set_product_probability("scrap-recycling", "battery", 0.06) + util.add_product("scrap-recycling", util.item("lead-expansion-bolt", 1, 0.01)) +else + util.set_product_probability("scrap-recycling", "battery", 0.08) + util.set_product_probability("scrap-recycling", "copper-cable", 0.03) +end + if (not mods["pyrawores"] and not mods["bobplates"] and not mods["angelssmelting"] and not mods["IndustrialRevolution"]) then util.replace_ingredient("pipe", "iron-plate", "lead-plate") util.replace_ingredient("pipe-to-ground", "iron-plate", "lead-plate") @@ -13,18 +23,30 @@ if (not mods["pyrawores"] and not mods["bobplates"] and not mods["angelssmelting util.replace_ingredient("sulfuric-acid", "iron-plate", "lead-plate") util.replace_ingredient("uranium-fuel-cell", "iron-plate", "lead-plate") - util.replace_some_ingredient("gun-turret", "iron-plate", 4, "lead-plate", 4) + util.replace_some_ingredient("gun-turret", "iron-plate", 8, leb, 8) - util.add_ingredient("big-electric-pole", "lead-plate", 2) - util.add_ingredient("large-electric-pole", "lead-plate", 2) --modded - util.add_ingredient("substation", "lead-plate", 2) - util.add_ingredient("electric-furnace", "lead-plate", 4) + util.add_ingredient("big-electric-pole", leb, 4) + util.add_ingredient("large-electric-pole", leb, 2) --modded + util.add_ingredient("substation", leb, 4) + util.replace_some_ingredient("electric-furnace", "steel-plate", 2, leb, 4) if not (mods.bzsilicon and util.has_ingredient("solar-panel", "solar-cell")) then util.add_ingredient("solar-panel", "lead-plate", 5) end - util.add_ingredient("flamethrower-turret", "lead-plate", 4) - util.add_ingredient("artillery-turret", "lead-plate", 40) + util.add_ingredient("flamethrower-turret", leb, 4) + util.add_ingredient("artillery-turret", leb, 40) + util.add_ingredient("laser-turret", leb, 2) + util.add_ingredient("rocket-turret", leb, 8) + util.add_ingredient("tesla-turret", leb, 4) + util.add_ingredient("electromagnetic-plant", leb, 8) + util.add_ingredient("lab", leb, 4) + util.replace_some_ingredient("assembling-machine-1", "iron-plate", 4, leb, 4) + util.replace_some_ingredient("chemical-plant", "steel-plate", 1, leb, 4) + util.replace_some_ingredient("chemical-plant", "steel-plate", 5, leb, 8) + util.add_ingredient("centrifuge", leb, 100) + + util.add_ingredient("fusion-reactor", "lead-lithium-eutectic", 200) + util.replace_some_ingredient("fusion-power-cell", "lithium-plate", 1, "lead-lithium-eutectic", 1) -- ammunition util.replace_ingredient("firearm-magazine", "iron-plate", "lead-plate") @@ -189,7 +211,6 @@ util.add_ingredient("plasma-turret", "lead-plate", 8) -- Other -util.add_ingredient("rocket-turret", "lead-plate", 8) util.add_ingredient("hl-rocket-turret-recipe", "lead-plate", 20)