recycling
This commit is contained in:
parent
38e67bc9b0
commit
7b9f0362eb
4 changed files with 26 additions and 2 deletions
|
|
@ -1,8 +1,15 @@
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 0.4.4
|
||||||
|
Date: 2021-05-21
|
||||||
|
Features:
|
||||||
|
- SE: Lead ore in scrap recycling
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 0.4.3
|
Version: 0.4.3
|
||||||
Date: 2021-05-21
|
Date: 2021-05-21
|
||||||
Features:
|
Features:
|
||||||
- Add option for lead in sulfuric acid introduced on 0.4.0. To be removed in 2022
|
- Add option for lead in sulfuric acid introduced on 0.4.0. To be removed in 2022
|
||||||
|
Changes:
|
||||||
|
- Minor pl l10n per TheoMarque
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 0.4.2
|
Version: 0.4.2
|
||||||
Date: 2021-05-21
|
Date: 2021-05-21
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bzlead",
|
"name": "bzlead",
|
||||||
"version": "0.4.3",
|
"version": "0.4.4",
|
||||||
"factorio_version": "1.1",
|
"factorio_version": "1.1",
|
||||||
"title": "Lead",
|
"title": "Lead",
|
||||||
"author": "Brevven",
|
"author": "Brevven",
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ if (not mods["pyrawores"] and not mods["bobplates"] and not mods["angelssmelting
|
||||||
util.replace_ingredient("shotgun-shell", "iron-plate", "lead-plate")
|
util.replace_ingredient("shotgun-shell", "iron-plate", "lead-plate")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Krastorio 2 changes
|
-- Krastorio 2 changes
|
||||||
if mods["Krastorio2"] then
|
if mods["Krastorio2"] then
|
||||||
util.add_ingredient("kr-laser-artillery-turret", "lead-plate", 10)
|
util.add_ingredient("kr-laser-artillery-turret", "lead-plate", 10)
|
||||||
|
|
@ -37,6 +36,8 @@ if mods["Krastorio2"] then
|
||||||
util.add_ingredient("kr-rocket-turret", "lead-plate", 10)
|
util.add_ingredient("kr-rocket-turret", "lead-plate", 10)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
util.add_product("se-scrap-recycling", {name="lead-ore", amount=1, probability=0.1})
|
||||||
|
|
||||||
if mods["WeaponPack"] then
|
if mods["WeaponPack"] then
|
||||||
util.replace_ingredient("9x18", "iron-plate", "lead-plate")
|
util.replace_ingredient("9x18", "iron-plate", "lead-plate")
|
||||||
util.replace_some_ingredient("9x19", "iron-plate", "lead-plate", 1)
|
util.replace_some_ingredient("9x19", "iron-plate", "lead-plate", 1)
|
||||||
|
|
|
||||||
16
util.lua
16
util.lua
|
|
@ -133,4 +133,20 @@ function replace_some_ingredient(recipe, old, new, amount)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Add a given quantity of product to a given recipe.
|
||||||
|
-- Only works for recipes with multiple products
|
||||||
|
function util.add_product(recipe_name, product)
|
||||||
|
if data.raw.recipe[recipe_name] then
|
||||||
|
add_product(data.raw.recipe[recipe_name], product)
|
||||||
|
add_product(data.raw.recipe[recipe_name].normal, product)
|
||||||
|
add_product(data.raw.recipe[recipe_name].expensive, product)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function add_product(recipe, product)
|
||||||
|
if recipe ~= nil and recipe.results ~= nil then
|
||||||
|
table.insert(recipe.results, product)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return util
|
return util
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue