making silver
This commit is contained in:
parent
8def50f752
commit
b1b91af4e8
4 changed files with 38 additions and 1 deletions
4
me.lua
4
me.lua
|
|
@ -12,6 +12,10 @@ function me.byproduct()
|
|||
return me.get_setting("bzgold-byproduct") and not me.get_setting("bz-no-byproduct")
|
||||
end
|
||||
|
||||
function me.lead_byproduct()
|
||||
return me.get_setting("bzlead-byproduct") and not me.get_setting("bz-no-byproduct")
|
||||
end
|
||||
|
||||
function me.silver()
|
||||
if me.get_setting("bz-all-intermediates") then return true end
|
||||
return me.get_setting("bzgold-silver")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
local util = require("data-util");
|
||||
|
||||
local results = {{"gold-ingot", 1}}
|
||||
|
||||
if util.me.silver() and util.me.byproduct() then
|
||||
results = {
|
||||
{type = "item", name="gold-ingot", amount=1, probability=.9},
|
||||
{type = "item", name="silver-ore", amount=1, probability=.1},
|
||||
}
|
||||
end
|
||||
|
||||
data:extend({
|
||||
{
|
||||
type = "item",
|
||||
|
|
@ -13,12 +22,13 @@ data:extend({
|
|||
{
|
||||
type = "recipe",
|
||||
name = "gold-ingot",
|
||||
main_product = "gold-ingot",
|
||||
category = "smelting",
|
||||
order = "d[gold-ingot]",
|
||||
enabled = false,
|
||||
energy_required = 1.6,
|
||||
ingredients = {{"gold-ore", 1}},
|
||||
results = {{"gold-ingot", 1}},
|
||||
results = results,
|
||||
},
|
||||
{
|
||||
type = "technology",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
local util = require("data-util")
|
||||
|
||||
-- K2 silver from copper
|
||||
if mods.Krastorio2 then
|
||||
util.replace_some_product("copper-plate", "copper-plate", 1, "silver-ore", 1)
|
||||
util.add_product("enriched-copper", {"silver-ore", 1})
|
||||
end
|
||||
|
||||
if mods.bztitanium then
|
||||
util.replace_ingredient("heat-exchanger", util.titanium_plate, "titanium-palladium-flange")
|
||||
util.replace_some_ingredient("steam-turbine", util.titanium_plate, 10, "titanium-palladium-flange", 10)
|
||||
|
|
|
|||
|
|
@ -118,4 +118,21 @@ if util.me.silver() then
|
|||
order = "b-b",
|
||||
},
|
||||
})
|
||||
|
||||
-- replace lead byproducts, set copper byproducts
|
||||
util.set_main_product("copper-plate", "copper-plate")
|
||||
if mods.bzlead and util.me.lead_byproduct() then
|
||||
util.replace_product("lead-plate", "copper-ore", "silver-ore")
|
||||
util.replace_product("enriched-lead", "copper-ore", "silver-ore")
|
||||
|
||||
-- small silver byproduct on copper, even if lead is enabled
|
||||
if not mods.Krastorio2 and util.me.byproduct() then
|
||||
util.add_product("copper-plate", {type=item, name="silver-ore", amount=1, probability=0.1})
|
||||
end
|
||||
else
|
||||
if not mods.Krastorio2 then
|
||||
util.multiply_recipe("copper-plate", 4)
|
||||
util.replace_some_product("copper-plate", "copper-plate", 1, "silver-ore", 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue