Skip to content

Commit

Permalink
Reduce rubber cost of insulated wire (#606)
Browse files Browse the repository at this point in the history
* Reduce rubber cost of insulated wire

Fixes: #603

* Better fix for circuit wires

This move the recipe fixes to a better location.  It also takes into
account running Angel's Bob' without Angel's Bioprocessing.

Fixes #603
  • Loading branch information
kryojenik authored Jul 3, 2021
1 parent d6f95b4 commit 15acfaf
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions angelspetrochem/prototypes/global-override/bobplates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,42 @@ if mods["bobplates"] then
)

-- bob electronics
if mods["bobelectronics"] then --check if it exists first
move_item("insulated-cable", "petrochem-solids", "a[petrochem-solids]-c[rubber]-b")
OV.patch_recipes({{name = "insulated-cable", subgroup = "petrochem-solids-2", order = "b[rubber]-c[cable]-c"}})
--[[
Normal Bob's (w or w/o Greenhouses) is 1 wood per 1 rubber per 2 circuit wires.
Bob's + Angel's Petrochem is 15 wood per 1 rubber per 2 circuit wires
Bob's + Angel's Petrochem + Bob's Greenhouses is 27 wood per 1 rubber per 2 circuit wires.
Bob's + Angel's Bioprocessing (w or w/o Greenhouses) is 30 wood per 1 rubber per 2 circuit wires.
How much tinned wire, and the yield is caculated by:
insulated-cable amount = wood_per_rubber * 2
tinned-copper-cable amount = wood_per_rubber * 2
energy_required = wood_per_rubber / 2
]]
local wood_per_rubber = 15
if angelsmods.bioprocessing then
wood_per_rubber = 30
elseif mods["bobgreenhouse"] then
wood_per_rubber = 27
end

OV.patch_recipes(
{
{
name = "insulated-cable",
subgroup = "petrochem-solids-2",
order = "b[rubber]-c[cable]-c",
ingredients = {
{type = "item", name = "tinned-copper-cable", amount = wood_per_rubber * 2},
{type = "item", name = "rubber", amount = 1}
},
results = {{type = "item", name = "insulated-cable", amount = wood_per_rubber * 2}},
energy_required = wood_per_rubber / 2
}
}
)


if mods["bobelectronics"] then --check if it exists first
OV.remove_unlock("electronics", "insulated-cable")
OV.add_unlock("circuit-network", "insulated-cable")
OV.add_unlock("circuit-network", "bob-rubber")
Expand Down

0 comments on commit 15acfaf

Please sign in to comment.