change stone usage, add wafer to red circuit
This commit is contained in:
parent
214bdf2082
commit
b1f4f38483
6 changed files with 85 additions and 9 deletions
|
|
@ -1,8 +1,11 @@
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 0.5.3
|
Version: 0.6.0
|
||||||
Date: 2021-03-11
|
Date: 2021-03-13
|
||||||
Changes:
|
Changes:
|
||||||
- Bio industries, crushed stone -> silica recipe is smelting now.
|
- Less silicon (or wafers) needed in processing units
|
||||||
|
- If using intermediates, wafers now required for advanced circuits
|
||||||
|
- Increase map's richness of stone slightly.
|
||||||
|
- Bio industries, crushed stone -> silica recipe is smelting now. More changes to come...
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 0.5.2
|
Version: 0.5.2
|
||||||
Date: 2021-03-11
|
Date: 2021-03-11
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,9 @@
|
||||||
require("recipe-updates")
|
require("recipe-updates")
|
||||||
require("recipes/silicon-vulcanite")
|
require("recipes/silicon-vulcanite")
|
||||||
|
|
||||||
|
|
||||||
|
local noise = require('noise');
|
||||||
|
-- Increase richness of stone a bit
|
||||||
|
data.raw.resource["stone"].autoplace.richness_expression =
|
||||||
|
data.raw.resource["stone"].autoplace.richness_expression * noise.to_noise_expression(4/3)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bzsilicon",
|
"name": "bzsilicon",
|
||||||
"version": "0.5.3",
|
"version": "0.6.0",
|
||||||
"factorio_version": "1.1",
|
"factorio_version": "1.1",
|
||||||
"title": "Silica & Silicon",
|
"title": "Silica & Silicon",
|
||||||
"author": "Brevven",
|
"author": "Brevven",
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ if not mods["Krastorio2"] then
|
||||||
util.add_prerequisite("concrete", "silica-processing")
|
util.add_prerequisite("concrete", "silica-processing")
|
||||||
|
|
||||||
if util.more_intermediates() then
|
if util.more_intermediates() then
|
||||||
util.replace_some_ingredient("processing-unit", "electronic-circuit", 10, "silicon-wafer", 5)
|
util.replace_some_ingredient("processing-unit", "electronic-circuit", 10, "silicon-wafer", 3)
|
||||||
util.replace_ingredient("effectivity-module", "electronic-circuit", "silicon-wafer")
|
util.replace_ingredient("effectivity-module", "electronic-circuit", "silicon-wafer")
|
||||||
util.replace_ingredient("productivity-module", "electronic-circuit", "silicon-wafer")
|
util.replace_ingredient("productivity-module", "electronic-circuit", "silicon-wafer")
|
||||||
util.replace_ingredient("speed-module", "electronic-circuit", "silicon-wafer")
|
util.replace_ingredient("speed-module", "electronic-circuit", "silicon-wafer")
|
||||||
|
|
@ -19,10 +19,15 @@ if not mods["Krastorio2"] then
|
||||||
util.replace_ingredient("solar-panel", "electronic-circuit", "solar-cell")
|
util.replace_ingredient("solar-panel", "electronic-circuit", "solar-cell")
|
||||||
util.replace_ingredient("solar-panel-equipment", "solar-panel", "solar-cell")
|
util.replace_ingredient("solar-panel-equipment", "solar-panel", "solar-cell")
|
||||||
util.add_effect("solar-energy", {type = "unlock-recipe", recipe="solar-cell"})
|
util.add_effect("solar-energy", {type = "unlock-recipe", recipe="solar-cell"})
|
||||||
|
|
||||||
|
|
||||||
|
util.multiply_recipe("advanced-circuit", 3)
|
||||||
|
util.replace_some_ingredient("advanced-circuit", "electronic-circuit", 3, "silicon-wafer", 1)
|
||||||
|
|
||||||
else
|
else
|
||||||
util.replace_some_ingredient("solar-panel", "electronic-circuit", 10, "silicon", 10)
|
util.replace_some_ingredient("solar-panel", "electronic-circuit", 10, "silicon", 10)
|
||||||
|
|
||||||
util.replace_some_ingredient("processing-unit", "electronic-circuit", 10, "silicon", 10)
|
util.replace_some_ingredient("processing-unit", "electronic-circuit", 10, "silicon", 6)
|
||||||
util.replace_ingredient("effectivity-module", "electronic-circuit", "silicon")
|
util.replace_ingredient("effectivity-module", "electronic-circuit", "silicon")
|
||||||
util.replace_ingredient("productivity-module", "electronic-circuit", "silicon")
|
util.replace_ingredient("productivity-module", "electronic-circuit", "silicon")
|
||||||
util.replace_ingredient("speed-module", "electronic-circuit", "silicon")
|
util.replace_ingredient("speed-module", "electronic-circuit", "silicon")
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,8 @@ if mods["space-exploration"] then
|
||||||
results = {
|
results = {
|
||||||
{name = "silicon", amount = 3},
|
{name = "silicon", amount = 3},
|
||||||
},
|
},
|
||||||
icons =
|
icons = {
|
||||||
{
|
{ icon = "__bzsilicon__/graphics/icons/silicon.png", icon_size = 64, icon_mipmaps = 3 },
|
||||||
{ icon = "__bzsilicon__/graphics/icons/silicon.png", icon_size = 64, icon_mipmaps = 3 },
|
|
||||||
{ icon = "__space-exploration-graphics__/graphics/icons/vulcanite-block.png", icon_size = 64, scale=0.25, shift= {-10, -10}},
|
{ icon = "__space-exploration-graphics__/graphics/icons/vulcanite-block.png", icon_size = 64, scale=0.25, shift= {-10, -10}},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
62
util.lua
62
util.lua
|
|
@ -131,4 +131,66 @@ function util.add_effect(technology_name, effect)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- check if a table contains a sought value
|
||||||
|
function util.contains(table, sought)
|
||||||
|
for i, value in pairs(table) do
|
||||||
|
if value == sought then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- multiply the cost, energy, and results of a recipe by a multiple
|
||||||
|
function util.multiply_recipe(recipe_name, multiple)
|
||||||
|
multiply_recipe(data.raw.recipe[recipe_name], multiple)
|
||||||
|
multiply_recipe(data.raw.recipe[recipe_name].normal, multiple)
|
||||||
|
multiply_recipe(data.raw.recipe[recipe_name].expensive, multiple)
|
||||||
|
end
|
||||||
|
|
||||||
|
function multiply_recipe(recipe, multiple)
|
||||||
|
if recipe then
|
||||||
|
if recipe.energy_required then
|
||||||
|
recipe.energy_required = recipe.energy_required * multiple
|
||||||
|
end
|
||||||
|
if recipe.result_count then
|
||||||
|
recipe.result_count = recipe.result_count * multiple
|
||||||
|
end
|
||||||
|
if recipe.results then
|
||||||
|
for i, result in pairs(recipe.results) do
|
||||||
|
if result.name then
|
||||||
|
if result.amount then
|
||||||
|
result.amount = result.amount * multiple
|
||||||
|
end
|
||||||
|
if result.amount_min ~= nil then
|
||||||
|
result.amount_min = result.amount_min * multiple
|
||||||
|
result.amount_max = result.amount_max * multiple
|
||||||
|
end
|
||||||
|
if result.catalyst_amount then
|
||||||
|
result.catalyst_amount = result.catalyst_amount * multiple
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if result[1] then
|
||||||
|
result[2] = result[2] * multiple
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not recipe.results and not recipe.result_count then
|
||||||
|
-- implicit one item result
|
||||||
|
recipe.result_count = multiple
|
||||||
|
end
|
||||||
|
if recipe.ingredients then
|
||||||
|
for i, ingredient in pairs(recipe.ingredients) do
|
||||||
|
if ingredient.name then
|
||||||
|
ingredient.amount = ingredient.amount * multiple
|
||||||
|
end
|
||||||
|
if ingredient[1] then
|
||||||
|
ingredient[2] = ingredient[2] * multiple
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return util
|
return util
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue