Make bz* and bz*2 compatible
This commit is contained in:
parent
cd6f596dca
commit
4fa81d4cc4
4 changed files with 32 additions and 13 deletions
|
|
@ -1,5 +1,19 @@
|
|||
local util = {}
|
||||
|
||||
util.bz = {}
|
||||
util.bz.carbon = mods["bzcarbon"] or mods["bzcarbon2"]
|
||||
util.bz.lead = mods["bzlead"] or mods["bzlead2"]
|
||||
util.bz.silicon = mods["bzsilicon"] or mods["bzsilicon2"]
|
||||
util.bz.tin = mods["bztin"] or mods["bztin2"]
|
||||
util.bz.titanium = mods["bztitanium"] or mods["bztitanium2"]
|
||||
util.bz.zirconium = mods["bzzirocnium"] or mods["bzzirocnium2"]
|
||||
util.bz.gold = mods["bzgold"] or mods["bzgold2"]
|
||||
util.bz.aluminum = mods["bzaluminum"] or mods["bzaluminum2"]
|
||||
util.bz.gas = mods["bzgas"] or mods["bzgas2"]
|
||||
util.bz.chlorine = mods["bzchlorine"] or mods["bzchlorine2"]
|
||||
util.bz.tungsten = mods["bztungsten"] or mods["bztungsten2"]
|
||||
util.bz.foundry = mods["bzfoundry"] or mods["bzfoundry2"]
|
||||
|
||||
-- se landfill
|
||||
-- params: ore, icon_size
|
||||
function util.se_landfill(params)
|
||||
|
|
|
|||
|
|
@ -40,12 +40,12 @@ data:extend({
|
|||
})
|
||||
|
||||
local solder_ingredients = {{type="item", name="indium-plate", amount=6}}
|
||||
if mods["bzlead2"] then
|
||||
if util.bz.lead then
|
||||
solder_ingredients = {{type="item", name="indium-plate", amount=3}, {type="item", name="lead-plate", amount=3}}
|
||||
end
|
||||
local solder_category = "crafting"
|
||||
local solder_subgroup = "intermediate-product"
|
||||
if mods["bzfoundry2"] then
|
||||
if util.bz.foundry then
|
||||
solder_category = "founding"
|
||||
solder_subgroup = "foundry-intermediate"
|
||||
end
|
||||
|
|
@ -94,18 +94,20 @@ data:extend({
|
|||
}
|
||||
})
|
||||
|
||||
if mods["bzsilicon2"] and data.raw.item["solar-cell"] then
|
||||
if util.bz.silicon and data.raw.item["solar-cell"] then
|
||||
local solar_cell_ingredients = {{type="item", name="copper-plate", amount=1}, {type="item", name="indium-plate", amount=1}, {type="item", name="electronic-circuit", amount=2}}
|
||||
if mods["Krastorio2"] then
|
||||
table.insert(solar_cell_ingredients, {type="item", name="kr-rare-metals", amount=1})
|
||||
end
|
||||
local mod = mods.bzsilicon and "__bzsilicon__" or "__bzsilicon2__"
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "recipe",
|
||||
name = "indium-solar-cell",
|
||||
icons =
|
||||
{
|
||||
{ icon = "__bzsilicon2__/graphics/icons/solar-cell.png", icon_size = 64 },
|
||||
{ icon = mod .. "/graphics/icons/solar-cell.png", icon_size = 64 },
|
||||
{ icon = "__Indium2__/graphics/icons/indium-plate.png", icon_size = 64, scale=0.2, shift= {-8, -8}},
|
||||
},
|
||||
category = "advanced-crafting",
|
||||
|
|
@ -121,22 +123,23 @@ if mods["bzsilicon2"] and data.raw.item["solar-cell"] then
|
|||
end
|
||||
|
||||
local solder_pcb_ingredients = {{type="item", name="indium-plate", amount=10}}
|
||||
if mods["bztin2"] then
|
||||
if util.bz.tin then
|
||||
solder_pcb_ingredients = {{type="item", name="indium-plate", amount=6}, {type="item", name="tin-plate", amount=5}}
|
||||
end
|
||||
local solder_pcb_category = "crafting"
|
||||
local solder_pcb_subgroup = "intermediate-product"
|
||||
if mods["bzfoundry2"] then
|
||||
if util.bz.foundry then
|
||||
solder_pcb_category = "founding"
|
||||
solder_pcb_subgroup = "foundry-intermediate"
|
||||
end
|
||||
if mods["bismuth"] and mods["bztin2"] then
|
||||
if mods["bismuth"] and util.bz.tin then
|
||||
local mod = mods.bztin and "__bztin__" or "__bztin2__"
|
||||
data:extend({
|
||||
{
|
||||
type = "recipe",
|
||||
name = "indium-pcb-solder",
|
||||
icons = {
|
||||
{ icon = "__bztin2__/graphics/icons/solder.png", icon_size = 128, tint = {r = 0.7, g = 0.5, b = 0.9, a = 1} },
|
||||
{ icon = mod .. "/graphics/icons/solder.png", icon_size = 128, tint = {r = 0.7, g = 0.5, b = 0.9, a = 1} },
|
||||
{ icon = "__Indium2__/graphics/icons/indium-plate.png", icon_size = 64, scale=0.2, shift= {-8, -8}},
|
||||
},
|
||||
group = "intermediate-products",
|
||||
|
|
@ -166,7 +169,7 @@ if mods["BrassTacks-Updated"] and data.raw.item["airtight-seal"]then
|
|||
order = "c",
|
||||
enabled = false,
|
||||
energy_required = 5,
|
||||
ingredients = {{type="item", name="bolted-flange", amount=1}, mods["bzcarbon2"] and {type="item", name="graphite", amount=4}, {type="item", name="indium-solder", amount=2}},
|
||||
ingredients = {{type="item", name="bolted-flange", amount=1}, util.bz.carbon and {type="item", name="graphite", amount=4}, {type="item", name="indium-solder", amount=2}},
|
||||
results = {{type="item", name="airtight-seal", amount=2}},
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -57,7 +57,9 @@ data:extend(
|
|||
}
|
||||
},
|
||||
})
|
||||
if (mods["bztin2"] and mods["bismuth"]) or false then
|
||||
if (util.bz.tin and mods["bismuth"]) or false then
|
||||
local mod = mods.bztin and "__bztin__" or "__bztin2__"
|
||||
|
||||
data:extend(
|
||||
{
|
||||
{
|
||||
|
|
@ -65,7 +67,7 @@ data:extend(
|
|||
name = "indium-pcb-solder",
|
||||
icons =
|
||||
{
|
||||
{ icon = "__bztin2__/graphics/icons/solder.png", icon_size = 128, tint = {r = 0.7, g = 0.5, b = 0.9, a = 1} },
|
||||
{ icon = mod .. "/graphics/icons/solder.png", icon_size = 128, tint = {r = 0.7, g = 0.5, b = 0.9, a = 1} },
|
||||
{ icon = "__Indium2__/graphics/icons/indium-plate.png", icon_size = 64, shift= {-8, -8}},
|
||||
},
|
||||
prerequisites = {"indium-processing"},
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ local util = require("data-util")
|
|||
|
||||
-- Mod changes
|
||||
if mods["IfNickel-Updated"] then
|
||||
if mods["IfNickel-Updated"] and mods["bztungsten2"] then
|
||||
util.replace_some_ingredient(mods["IfNickel-Updated"] and "gimbaled-thruster", mods["bztungsten2"] and "rocket-engine-nozzle", 1, "cryogenic-seal", 1)
|
||||
if mods["IfNickel-Updated"] and util.bz.thungsten then
|
||||
util.replace_some_ingredient(mods["IfNickel-Updated"] and "gimbaled-thruster", util.bz.thungsten and "rocket-engine-nozzle", 1, "cryogenic-seal", 1)
|
||||
end
|
||||
util.remove_ingredient("satellite", "gimbaled-thruster")
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue