Compare commits

..

10 commits

Author SHA1 Message Date
Simon Brodtmann
82835bc315 info/readme/changelog 2025-10-19 15:20:44 +02:00
Simon Brodtmann
7fbd88ff2d Rename mod 2025-10-19 15:17:20 +02:00
Simon Brodtmann
b5e4b76fdc gitignore 2025-10-19 15:14:53 +02:00
Simon Brodtmann
a47b12027a Restructure repository 2025-10-19 15:14:18 +02:00
Simon Brodtmann
25c42d3708 Update bz mods to version 2 2025-10-19 15:10:55 +02:00
Simon Brodtmann
e900b41958 Update to 2.0 2025-10-16 00:23:29 +02:00
Brevven
593841534e ver, cred 2023-12-29 17:44:21 -08:00
Brevven
0a946a2c36 SE+K2+Bobs recipe fixes 2023-12-29 17:39:11 -08:00
Brevven
fc3a955594 silver brazing alloy handcraft 2023-12-29 17:39:10 -08:00
Brevven
8bfeec74d9 merge bob CPUs to ours 2023-12-29 17:39:10 -08:00
160 changed files with 608 additions and 963 deletions

3
.editorconfig Normal file
View file

@ -0,0 +1,3 @@
[*]
indent_style = space
indent_size = 2

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
.idea
*.zip

View file

@ -1,37 +0,0 @@
# General makefile for factorio mods.
#
# Presumes the development work is done in a <factoriodir>/dev/<modname>/
# directory where this makefile resides. This directory must be parallel to
# the <factoriodir>/mods/ directory where mods are installed. Run `make
# install` from dev/<modname> to install the mod as a zip file. That zip file
# should also be ready to upload to the mod portal
.PHONY: copy lint-changelog install
libdir = "../bzlib"
libfiles = $(shell ls $(libdir)/*.lua | grep -o '[^/]*.lua')
pwd = $(shell pwd)
v = $(shell basename "$(pwd)")_$(shell jq -r .version info.json)
link:
for f in $(libfiles) ; do \
echo "using $(libdir)/$$f" ;\
cp $(libdir)/$$f .; \
done;
copy: link
rm -rf ../$(v)
mkdir -p ../$(v)
cp -rf * ../$(v)
rm -f ../$(v).zip
cd ..; zip -9 -r -y $(v).zip $(v) -x "*.xcf" -x "*.git*" -x "*.bak" -x "*.blend*"
install: lint-changelog copy
cp -f ../$(v).zip ../../mods/
lint-changelog: copy
python3 ../da-changelog-tools_0.0.14/changelog-checker.py --changelog ../$(v).zip
zorro:
python3 ../da-changelog-tools_0.0.14/changelog-checker.py --zorro --changelog ../$(v).zip

View file

@ -1,21 +1,19 @@
# Noble Metals
[factorio mod page](https://mods.factorio.com/mod/bzgold)
Adds gold, silver, platinum and palladium to the game. Reworks processing units and much more.
## Version History
See changelog.txt
This mod adds more complexity to a vanilla Factorio game, especially after chemical science, though silver shows up earlier. As always, the more BZ mods you add the more complex the game will become.
## Created by
- [brevven](https://mods.factorio.com/user/brevven) (code, design, graphics)
Note, when silver from this mod is used with [Lead](https://mods.factorio.com/mod/bzlead), lead outputs a silver byproduct instead of a copper byproduct.
## Thanks to
## Credits
- Brevven ([Original mod](https://mods.factorio.com/mod/bzgold))
- [cackling fiend](https://mods.factorio.com/user/cackling.fiend) (Update to 2.0)
- [snouz](https://github.com/snouz) (inspiration for logo)
### Localization
- [Klarkxy](https://github.com/klarkxy) (zh-CN)
- [Sakuro](https://mods.factorio.com/user/sakuro) (ja)
### Testing
- [Sakuro](https://mods.factorio.com/user/sakuro)

5
bzgold2/changelog.txt Normal file
View file

@ -0,0 +1,5 @@
---------------------------------------------------------------------------------------------------
Version: 2.0.0
Date: 19.10.2025
Changes:
- Update to Factorio 2.0

View file

@ -1,6 +1,6 @@
local util = require("data-util");
if mods["248k"] then
if mods["248k-Redux"] then
local au2 = "fu_materials_gold_ingot"
-- Swap out all 248k gold ingot for BZ gold ingot

View file

@ -0,0 +1,16 @@
local util = require("data-util")
if mods.bobelectronics or mods.MDbobelectronics or mods.MDbobelectronics2 then
util.replace_ingredient("advanced-processing-unit", "processing-electronics", "cpu", 4)
util.remove_recipe_effect("advanced-electronics-3", "processing-electronics")
util.remove_raw("recipe", "processing-electronics")
util.remove_raw("item", "processing-electronics")
if mods["Krastorio2"] then
data.raw.recipe["kr-crush-processing-electronics"] = nil
end
if mods["248k-Redux"] then
data.raw.recipe["fu_burn_processing-electronics_recipe"] = nil
end
end

View file

@ -1,5 +1,6 @@
require("prototypes/tech-updates")
require("prototypes/processing-unit-updates")
require("compatibility/bobelectronics")
require("prototypes/recipe-updates")
require("prototypes/recipe-updates-se")
require("map-gen-preset-updates")

View file

@ -44,7 +44,7 @@ if get_setting("bz-recipe-bypass") then
end
function util.is_foundry()
return mods.bzfoundry and not me.get_setting("bzfoundry-minimal")
return mods.bzfoundry2 and not me.get_setting("bzfoundry-minimal")
end
function should_force(options)
@ -64,17 +64,7 @@ function util.fe_plus(sub)
end
end
function util.get_stack_size(default)
if mods.Krastorio2 then
local size = get_setting("kr-stack-size")
if size and tonumber(size) then
return tonumber(size)
end
end
return default
end
function util.k2assets()
function util.k2assets()
if mods["Krastorio2Assets"] then
return "__Krastorio2Assets__"
end
@ -111,8 +101,8 @@ function util.se_landfill(params)
category = "hard-recycling",
order = "z-b-"..params.ore,
subgroup = "terrain",
result = "landfill",
ingredients = {{params.ore, 50}},
results = {{type="item", name="landfill", amount=1}},
ingredients = {{type="item", name=params.ore, amount=50}},
}
})
util.add_unlock("se-recycling-facility", lname)
@ -123,7 +113,7 @@ end
-- k2 matter
-- params: {k2matter}, k2baseicon , {icon}
function util.k2matter(params)
local matter = require("__Krastorio2__/lib/public/data-stages/matter-util")
local matter = require("__Krastorio2__/prototypes/libraries/matter")
if mods["space-exploration"] then
params.k2matter.need_stabilizer = true
end
@ -169,7 +159,7 @@ function util.k2matter(params)
{
{"production-science-pack", 1},
{"utility-science-pack", 1},
{"matter-tech-card", 1}
{"kr-matter-tech-card", 1}
},
time = 45,
},
@ -177,7 +167,7 @@ function util.k2matter(params)
},
})
end
matter.createMatterRecipe(params.k2matter)
matter.make_recipes(params.k2matter)
end
@ -211,16 +201,16 @@ function util.se_matter(params)
energy_required = params.energy_required,
enabled = false,
ingredients = {
{sedata, 1},
{type="item", name=sedata, amount=1},
{type="fluid", name="se-particle-stream", amount=50},
{type="fluid", name="se-space-coolant-supercooled", amount=25},
},
results = {
{params.ore, params.quant_out},
{"se-contaminated-scrap", 1},
{type=item, name=sedata, amount=1, probability=.99},
{type=item, name=sejunk, amount=1, probability=.01},
{type="fluid", name="se-space-coolant-hot", amount=25, catalyst_amount=25},
{type="item", name=params.ore, amount=params.quant_out},
{type="item", name="se-contaminated-scrap", amount=1},
{type="item", name=sedata, amount=1, probability=.99},
{type="item", name=sejunk, amount=1, probability=.01},
{type="fluid", name="se-space-coolant-hot", amount=25, ignored_by_productivity=25},
}
}
})
@ -250,14 +240,14 @@ function util.se_matter(params)
energy_required = 30,
enabled = false,
ingredients = {
{"se-kr-matter-liberation-data", 1},
{params.ore, params.quant_in},
{type="item", name="se-kr-matter-liberation-data", amount=1},
{type="item", name=params.ore, amount=params.quant_in},
{type="fluid", name="se-particle-stream", amount=50},
},
results = {
{type=item, name="se-kr-matter-liberation-data", amount=1, probability=.99},
{type=item, name=sejunk, amount=1, probability=.01},
{type="fluid", name="se-particle-stream", amount=params.stream_out, catalyst_amount=50},
{type="item", name="se-kr-matter-liberation-data", amount=1, probability=.99},
{type="item", name=sejunk, amount=1, probability=.01},
{type="fluid", name="se-particle-stream", amount=params.stream_out, ignored_by_productivity=50},
}
}
})
@ -284,7 +274,7 @@ function util.se_matter(params)
{"se-astronomic-science-pack-4", 1},
{"se-energy-science-pack-4", 1},
{"se-material-science-pack-4", 1},
{"matter-tech-card", 1},
{"kr-matter-tech-card", 1},
{"se-deep-space-science-pack-1", 1},
}
@ -298,18 +288,6 @@ function util.se_matter(params)
end
end
-- Get the normal prototype for a recipe -- either .normal or the recipe itself
function util.get_normal(recipe_name)
if data.raw.recipe[recipe_name] then
recipe = data.raw.recipe[recipe_name]
if recipe.normal and recipe.normal.ingredients then
return recipe.normal
elseif recipe.ingredients then
return recipe
end
end
end
-- Set/override a technology's prerequisites
function util.set_prerequisite(technology_name, prerequisites)
local technology = data.raw.technology[technology_name]
@ -376,7 +354,7 @@ function util.add_unlock(technology_name, recipe)
end
-- Check if a tech unlocks a recipe
function util.check_unlock(technology_name, recipe_name)
function util.check_unlock(technology_name, recipe)
local technology = data.raw.technology[technology_name]
if technology and technology.effects then
for i, effect in pairs(technology.effects) do
@ -421,17 +399,13 @@ end
function util.set_enabled(recipe_name, enabled)
if data.raw.recipe[recipe_name] then
if data.raw.recipe[recipe_name].normal then data.raw.recipe[recipe_name].normal.enabled = enabled end
if data.raw.recipe[recipe_name].expensive then data.raw.recipe[recipe_name].expensive.enabled = enabled end
if not data.raw.recipe[recipe_name].normal then data.raw.recipe[recipe_name].enabled = enabled end
data.raw.recipe[recipe_name].enabled = enabled
end
end
function util.set_hidden(recipe_name)
if data.raw.recipe[recipe_name] then
if data.raw.recipe[recipe_name].normal then data.raw.recipe[recipe_name].normal.hidden = true end
if data.raw.recipe[recipe_name].expensive then data.raw.recipe[recipe_name].expensive.hidden = true end
if not data.raw.recipe[recipe_name].normal then data.raw.recipe[recipe_name].hidden = true end
data.raw.recipe[recipe_name].hidden = true
end
end
@ -441,8 +415,6 @@ function util.add_or_add_to_ingredient(recipe_name, ingredient, quantity, option
if data.raw.recipe[recipe_name] and data.raw.item[ingredient] then
me.add_modified(recipe_name)
add_or_add_to_ingredient(data.raw.recipe[recipe_name], ingredient, quantity)
add_or_add_to_ingredient(data.raw.recipe[recipe_name].normal, ingredient, quantity)
add_or_add_to_ingredient(data.raw.recipe[recipe_name].expensive, ingredient, quantity)
end
end
@ -465,8 +437,6 @@ function util.add_ingredient(recipe_name, ingredient, quantity, options)
if data.raw.recipe[recipe_name] and (data.raw.item[ingredient] or is_fluid) then
me.add_modified(recipe_name)
add_ingredient(data.raw.recipe[recipe_name], ingredient, quantity, is_fluid)
add_ingredient(data.raw.recipe[recipe_name].normal, ingredient, quantity, is_fluid)
add_ingredient(data.raw.recipe[recipe_name].expensive, ingredient, quantity, is_fluid)
end
end
@ -480,7 +450,7 @@ function add_ingredient(recipe, ingredient, quantity, is_fluid)
if is_fluid then
table.insert(recipe.ingredients, {type="fluid", name=ingredient, amount=quantity})
else
table.insert(recipe.ingredients, {ingredient, quantity})
table.insert(recipe.ingredients, {type="item", name=ingredient, amount=quantity})
end
end
end
@ -491,8 +461,6 @@ function util.add_ingredient_raw(recipe_name, ingredient, options)
if data.raw.recipe[recipe_name] and (data.raw.item[ingredient.name] or data.raw.item[ingredient[1]]) then
me.add_modified(recipe_name)
add_ingredient_raw(data.raw.recipe[recipe_name], ingredient)
add_ingredient_raw(data.raw.recipe[recipe_name].normal, ingredient)
add_ingredient_raw(data.raw.recipe[recipe_name].expensive, ingredient)
end
end
@ -516,8 +484,6 @@ function util.set_ingredient(recipe_name, ingredient, quantity, options)
if data.raw.recipe[recipe_name] and data.raw.item[ingredient] then
me.add_modified(recipe_name)
set_ingredient(data.raw.recipe[recipe_name], ingredient, quantity)
set_ingredient(data.raw.recipe[recipe_name].normal, ingredient, quantity)
set_ingredient(data.raw.recipe[recipe_name].expensive, ingredient, quantity)
end
end
@ -541,29 +507,18 @@ end
-- Only works for recipes with multiple products
function util.add_product(recipe_name, product, options)
if not should_force(options) and bypass(recipe_name) then return end
if data.raw.recipe[recipe_name] and
(data.raw.item[product[1]] or data.raw.item[product.name] or
data.raw.fluid[product[1]] or data.raw.fluid[product.name]
) then
if data.raw.recipe[recipe_name] and
(data.raw.item[product.name] or data.raw.fluid[product.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 then
if (product[1] and data.raw.item[product[1]]) or
(product.name and data.raw[product.type][product.name]) then
if not recipe.normal then
if recipe.results == nil then
recipe.results = {{recipe.result, recipe.result_count and recipe.result_count or 1}}
end
recipe.result = nil
recipe.result_count = nil
table.insert(recipe.results, product)
if recipe.results == nil then
recipe.results = {}
end
end
table.insert(recipe.results, product)
end
end
@ -571,18 +526,13 @@ end
function util.get_ingredient_amount(recipe_name, ingredient_name)
local recipe = data.raw.recipe[recipe_name]
if recipe then
if recipe.normal and recipe.normal.ingredients then
for i, ingredient in pairs(recipe.normal.ingredients) do
if ingredient[1] == ingredient_name then return ingredient[2] end
if ingredient.name == ingredient_name then return ingredient.amount end
end
elseif recipe.ingredients then
if recipe.ingredients then
for i, ingredient in pairs(recipe.ingredients) do
if ingredient[1] == ingredient_name then return ingredient[2] end
if ingredient.name == ingredient_name then return ingredient.amount end
end
end
return 0
return 1
end
return 0
end
@ -592,14 +542,7 @@ function util.get_amount(recipe_name, product)
if not product then product = recipe_name end
local recipe = data.raw.recipe[recipe_name]
if recipe then
if recipe.normal and recipe.normal.results then
for i, result in pairs(recipe.normal.results) do
if result[1] == product then return result[2] end
if result.name == product then return result.amount end
end
elseif recipe.normal and recipe.normal.result_count then
return recipe.normal.result_count
elseif recipe.results then
if recipe.results then
for i, result in pairs(recipe.results) do
if result[1] == product then return result[2] end
if result.name == product then return result.amount end
@ -617,9 +560,7 @@ function util.get_result_count(recipe_name, product)
if not product then product = recipe_name end
local recipe = data.raw.recipe[recipe_name]
if recipe then
if recipe.normal and recipe.normal.results then
return #(recipe.normal.results)
elseif recipe.results then
if recipe.results then
return #(recipe.results)
end
return 1
@ -634,8 +575,6 @@ function util.replace_ingredient(recipe_name, old, new, amount, multiply, option
if data.raw.recipe[recipe_name] and (data.raw.item[new] or data.raw.fluid[new]) then
me.add_modified(recipe_name)
replace_ingredient(data.raw.recipe[recipe_name], old, new, amount, multiply)
replace_ingredient(data.raw.recipe[recipe_name].normal, old, new, amount, multiply)
replace_ingredient(data.raw.recipe[recipe_name].expensive, old, new, amount, multiply)
end
end
@ -677,8 +616,6 @@ function util.remove_ingredient(recipe_name, old, options)
if data.raw.recipe[recipe_name] then
me.add_modified(recipe_name)
remove_ingredient(data.raw.recipe[recipe_name], old)
remove_ingredient(data.raw.recipe[recipe_name].normal, old)
remove_ingredient(data.raw.recipe[recipe_name].expensive, old)
end
end
@ -704,28 +641,23 @@ function util.replace_some_product(recipe_name, old, old_amount, new, new_amount
if data.raw.recipe[recipe_name] and (data.raw.item[new] or is_fluid) then
me.add_modified(recipe_name)
replace_some_product(data.raw.recipe[recipe_name], old, old_amount, new, new_amount, is_fluid)
replace_some_product(data.raw.recipe[recipe_name].normal, old, old_amount, new, new_amount, is_fluid)
replace_some_product(data.raw.recipe[recipe_name].expensive, old, old_amount, new, new_amount, is_fluid)
end
end
function replace_some_product(recipe, old, old_amount, new, new_amount)
function replace_some_product(recipe, old, old_amount, new, new_amount, is_fluid)
if recipe ~= nil then
if recipe.result == new then return end
if recipe.results then
for i, existing in pairs(recipe.results) do
if existing[1] == new or existing.name == new then
if existing.name == new then
return
end
end
end
add_product(recipe, {new, new_amount})
add_product(recipe, {type=is_fluid and "fluid" or "item", name=new, amount=new_amount})
for i, product in pairs(recipe.results) do
if product.name == old then
product.amount = math.max(1, product.amount - old_amount)
end
if product[1] == old then
product[2] = math.max(1, product[2] - old_amount)
end
end
end
@ -738,8 +670,6 @@ function util.replace_some_ingredient(recipe_name, old, old_amount, new, new_amo
if data.raw.recipe[recipe_name] and (data.raw.item[new] or is_fluid) then
me.add_modified(recipe_name)
replace_some_ingredient(data.raw.recipe[recipe_name], old, old_amount, new, new_amount, is_fluid)
replace_some_ingredient(data.raw.recipe[recipe_name].normal, old, old_amount, new, new_amount, is_fluid)
replace_some_ingredient(data.raw.recipe[recipe_name].expensive, old, old_amount, new, new_amount, is_fluid)
end
end
@ -768,8 +698,6 @@ function util.set_product_amount(recipe_name, product, amount, options)
me.add_modified(recipe_name)
if data.raw.recipe[recipe_name] then
set_product_amount(data.raw.recipe[recipe_name], product, amount)
set_product_amount(data.raw.recipe[recipe_name].normal, product, amount)
set_product_amount(data.raw.recipe[recipe_name].expensive, product, amount)
end
end
@ -808,8 +736,6 @@ function util.multiply_recipe(recipe_name, multiple, options)
me.add_modified(recipe_name)
if data.raw.recipe[recipe_name] then
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
end
@ -817,8 +743,6 @@ function multiply_recipe(recipe, multiple)
if recipe then
if recipe.energy_required then
recipe.energy_required = recipe.energy_required * multiple
else
recipe.energy_required = 0.5 * multiple -- 0.5 is factorio default
end
if recipe.result_count then
recipe.result_count = recipe.result_count * multiple
@ -833,8 +757,8 @@ function multiply_recipe(recipe, multiple)
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
if result.ignored_by_productivity then
result.ignored_by_productivity = result.ignored_by_productivity * multiple
end
end
if result[1] then
@ -861,9 +785,8 @@ end
-- Returns true if a recipe has an ingredient
function util.has_ingredient(recipe_name, ingredient)
return data.raw.recipe[recipe_name] and (
has_ingredient(data.raw.recipe[recipe_name], ingredient) or
has_ingredient(data.raw.recipe[recipe_name].normal, ingredient))
return data.raw.recipe[recipe_name] and
has_ingredient(data.raw.recipe[recipe_name], ingredient)
end
function has_ingredient(recipe, ingredient)
@ -883,8 +806,6 @@ function util.remove_product(recipe_name, old, options)
me.add_modified(recipe_name)
if data.raw.recipe[recipe_name] then
remove_product(data.raw.recipe[recipe_name], old)
remove_product(data.raw.recipe[recipe_name].normal, old)
remove_product(data.raw.recipe[recipe_name].expensive, old)
end
end
@ -907,8 +828,6 @@ function util.set_main_product(recipe_name, product, options)
if not should_force(options) and bypass(recipe_name) then return end
if data.raw.recipe[recipe_name] then
set_main_product(data.raw.recipe[recipe_name], product)
set_main_product(data.raw.recipe[recipe_name].normal, product)
set_main_product(data.raw.recipe[recipe_name].expensive, product)
end
end
@ -922,13 +841,11 @@ end
function util.replace_product(recipe_name, old, new, options)
if not should_force(options) and bypass(recipe_name) then return end
if data.raw.recipe[recipe_name] then
replace_product(data.raw.recipe[recipe_name], old, new, options)
replace_product(data.raw.recipe[recipe_name].normal, old, new, options)
replace_product(data.raw.recipe[recipe_name].expensive, old, new, options)
replace_product(data.raw.recipe[recipe_name], old, new)
end
end
function replace_product(recipe, old, new, options)
function replace_product(recipe, old, new)
if recipe then
if recipe.main_product == old then
recipe.main_product = new
@ -968,8 +885,6 @@ function util.set_recipe_time(recipe_name, time, options)
me.add_modified(recipe_name)
if data.raw.recipe[recipe_name] then
set_recipe_time(data.raw.recipe[recipe_name], time)
set_recipe_time(data.raw.recipe[recipe_name].normal, time)
set_recipe_time(data.raw.recipe[recipe_name].expensive, time)
end
end
@ -987,8 +902,6 @@ function util.multiply_time(recipe_name, factor, options)
me.add_modified(recipe_name)
if data.raw.recipe[recipe_name] then
multiply_time(data.raw.recipe[recipe_name], factor)
multiply_time(data.raw.recipe[recipe_name].normal, factor)
multiply_time(data.raw.recipe[recipe_name].expensive, factor)
end
end
@ -1006,8 +919,6 @@ function util.add_time(recipe_name, amount, options)
me.add_modified(recipe_name)
if data.raw.recipe[recipe_name] then
add_time(data.raw.recipe[recipe_name], amount)
add_time(data.raw.recipe[recipe_name].normal, amount)
add_time(data.raw.recipe[recipe_name].expensive, amount)
end
end
@ -1031,7 +942,7 @@ end
-- Set recipe subgroup
function util.set_subgroup(recipe_name, subgroup, options)
if not should_force(options) and bypass(recipe_name) then return end
if data.raw.recipe[recipe_name] and data.raw["item-subgroup"][subgroup] then
if data.raw.recipe[recipe_name] then
me.add_modified(recipe_name)
data.raw.recipe[recipe_name].subgroup = subgroup
end
@ -1050,34 +961,16 @@ function util.add_icon(recipe_name, icon, options)
if data.raw.recipe[recipe_name] then
me.add_modified(recipe_name)
if not (data.raw.recipe[recipe_name].icons and #(data.raw.recipe[recipe_name].icons) > 0) then
if data.raw.recipe[recipe_name].icon then
data.raw.recipe[recipe_name].icons = {{
icon=data.raw.recipe[recipe_name].icon,
icon_size=data.raw.recipe[recipe_name].icon_size,
icon_mipmaps=data.raw.recipe[recipe_name].icon_mipmaps,
}}
elseif data.raw.item[data.raw.recipe[recipe_name].main_product] then
data.raw.recipe[recipe_name].icons = {{
icon=data.raw.item[data.raw.recipe[recipe_name].main_product].icon,
icon_size=data.raw.item[data.raw.recipe[recipe_name].main_product].icon_size,
icon_mipmaps=data.raw.item[data.raw.recipe[recipe_name].main_product].icon_mipmaps,
}}
elseif data.raw.item[data.raw.recipe[recipe_name].result] then
data.raw.recipe[recipe_name].icons = {{
icon=data.raw.item[data.raw.recipe[recipe_name].result].icon,
icon_size=data.raw.item[data.raw.recipe[recipe_name].result].icon_size,
icon_mipmaps=data.raw.item[data.raw.recipe[recipe_name].result].icon_mipmaps,
}}
elseif data.raw.recipe[recipe_name].normal and
data.raw.item[data.raw.recipe[recipe_name].normal.result] then
data.raw.recipe[recipe_name].icons = {{
icon=data.raw.item[data.raw.recipe[recipe_name].normal.result].icon,
icon_size=data.raw.item[data.raw.recipe[recipe_name].normal.result].icon_size,
icon_mipmaps=data.raw.item[data.raw.recipe[recipe_name].normal.result].icon_mipmaps,
}}
end
data.raw.recipe[recipe_name].icon = nil
data.raw.recipe[recipe_name].icon_size = nil
data.raw.recipe[recipe_name].icons = {}
if data.raw.recipe[recipe_name].icon then
data.raw.recipe[recipe_name].icons = {{
icon=data.raw.recipe[recipe_name].icon,
icon_size=data.raw.recipe[recipe_name].icon_size,
icon_mipmaps=data.raw.recipe[recipe_name].icon_mipmaps,
}}
data.raw.recipe[recipe_name].icon = nil
data.raw.recipe[recipe_name].icon_size = nil
end
end
table.insert(data.raw.recipe[recipe_name].icons, icon)
end
@ -1137,8 +1030,6 @@ function util.add_to_ingredient(recipe, ingredient, amount, options)
if not should_force(options) and bypass(recipe_name) then return end
if data.raw.recipe[recipe] then
add_to_ingredient(data.raw.recipe[recipe], ingredient, amount)
add_to_ingredient(data.raw.recipe[recipe].normal, ingredient, amount)
add_to_ingredient(data.raw.recipe[recipe].expensive, ingredient, amount)
end
end
@ -1161,8 +1052,6 @@ function util.add_to_product(recipe_name, product, amount, options)
if not should_force(options) and bypass(recipe_name) then return end
if data.raw.recipe[recipe_name] then
add_to_product(data.raw.recipe[recipe_name], product, amount)
add_to_product(data.raw.recipe[recipe_name].normal, product, amount)
add_to_product(data.raw.recipe[recipe_name].expensive, product, amount)
end
end
@ -1285,10 +1174,8 @@ function remove_prior_unlocks(tech, recipe)
util.remove_recipe_effect(tech, recipe)
if technology.prerequisites then
for i, prerequisite in pairs(technology.prerequisites) do
if string.sub(prerequisite, 1, 3) ~= 'ei_' then
-- log("BZZZ removing prior unlocks for " .. recipe .. " from " .. tech ..", checking " .. prerequisite) -- Handy Debug :|
remove_prior_unlocks(prerequisite, recipe)
end
-- log("BZZZ removing prior unlocks for " .. tech ..", checking " .. prerequisite) -- Handy Debug :|
remove_prior_unlocks(prerequisite, recipe)
end
end
end
@ -1330,9 +1217,7 @@ function replace_ingredients_prior_to(tech, old, new, multiplier)
if technology.prerequisites then
for i, prerequisite in pairs(technology.prerequisites) do
-- log("BZZZ checking " .. prerequisite) -- Handy Debug :|
if string.sub(prerequisite, 1, 3) ~= 'ei_' then
replace_ingredients_prior_to(prerequisite, old, new, multiplier)
end
replace_ingredients_prior_to(prerequisite, old, new, multiplier)
end
end
end

View file

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 565 B

After

Width:  |  Height:  |  Size: 565 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 601 B

After

Width:  |  Height:  |  Size: 601 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 510 B

After

Width:  |  Height:  |  Size: 510 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 619 B

After

Width:  |  Height:  |  Size: 619 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 207 B

After

Width:  |  Height:  |  Size: 207 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 234 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 221 B

After

Width:  |  Height:  |  Size: 221 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 211 B

After

Width:  |  Height:  |  Size: 211 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 9 KiB

After

Width:  |  Height:  |  Size: 9 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Before After
Before After

32
bzgold2/info.json Normal file
View file

@ -0,0 +1,32 @@
{
"name": "bzgold2",
"version": "2.0.0",
"factorio_version": "2.0",
"title": "Noble Metals",
"description": "Adds silver, gold, platinum, palladium and more to the base game. Reworks processing units.",
"author": "Brevven, cackling fiend",
"homepage": "https://discord.gg/ufvFUJtVwk",
"dependencies": [
"base >= 2.0.0",
"? bzfoundry2 >= 2.0.0",
"? bztitanium >= 2.0.26",
"? bzlead >= 2.0.28",
"? bzzirconium >= 2.1.13",
"? bztungsten >= 0.6.0",
"? bzcarbon >= 2.0.21",
"? bztin >= 2.1.15",
"? bzgas2",
"? bzchlorine2",
"? 248k-Redux >= 0.1.22",
"? space-exploration >= 0.7.34",
"? aai-industry",
"(?) aai-loaders",
"? Krastorio2",
"? bobelectronics",
"? MDbobelectronics2",
"? modmashsplintergold",
"? deadlock-beltboxes-loaders",
"? DeadlockCrating",
"! space-age"
]
}

View file

@ -4,25 +4,27 @@ if mods["Krastorio2"] then
util.k2matter({
k2matter = {
material = { type = "item", name = "gold-ore", amount = 30 },
item_name = "gold-ore",
matter_value = 30,
matter_count = 30,
energy_required = 10,
need_stabilizer = false,
unlocked_by_technology = "gold-matter-processing",
},
k2baseicon = "stone",
icon = {icon = "__bzgold__/graphics/icons/gold-ore.png", icon_size = 128, scale = 1}
icon = {icon = "__bzgold2__/graphics/icons/gold-ore.png", icon_size = 128, scale = 1}
})
util.k2matter({
k2matter = {
material = { type = "item", name = "silver-ore", amount = 8 },
item_name = "silver-ore",
matter_value = 8,
matter_count = 8,
energy_required = 5,
need_stabilizer = false,
unlocked_by_technology = "silver-matter-processing",
},
k2baseicon = "stone",
icon = {icon = "__bzgold__/graphics/icons/silver-ore.png", icon_size = 128, scale = 1}
icon = {icon = "__bzgold2__/graphics/icons/silver-ore.png", icon_size = 128, scale = 1}
})
end

View file

@ -1,6 +1,6 @@
local me = {}
me.name = "bzgold"
me.name = "bzgold2"
me.list = {}
me.recipes = {
"electronic-circuit-silver", "silver-plate", "silver-wire",

View file

@ -0,0 +1,6 @@
{
"item":
[
["processing-electronics", "cpu"]
]
}

9
bzgold2/modules.lua Normal file
View file

@ -0,0 +1,9 @@
-- Enable prod modules for some recipes
-- Recipes with very specific ratios are deliberately excluded
local util = require("data-util")
for i, recipe in pairs(util.me.recipes) do
if data.raw.recipe[recipe] then
data.raw.recipe[recipe].allow_productivity = true
end
end

View file

@ -11,11 +11,11 @@ if util.me.alchemy() then
order = "d[gold-ingot]2",
enabled = false,
energy_required = 16,
ingredients = {{"lead-plate", 2}},
results = {{"gold-ingot", 1}},
ingredients = {{type="item", name="lead-plate", amount=2}},
results = {{type="item", name="gold-ingot", amount=1}},
icons = {
{
icon = "__bzgold__/graphics/icons/gold-ingot.png",
icon = "__bzgold2__/graphics/icons/gold-ingot.png",
icon_size = 128,
},
{
@ -29,7 +29,7 @@ if util.me.alchemy() then
name = "alchemy",
icons = {
{
icon = "__bzgold__/graphics/technology/gold-processing.png",
icon = "__bzgold2__/graphics/technology/gold-processing.png",
icon_size = 256,
},
{

View file

@ -6,17 +6,17 @@ if util.me.catalysis() then
{
type = "item",
name = "ptpd-catalyst",
icon = "__bzgold__/graphics/icons/ptpd-catalyst.png",
icon = "__bzgold2__/graphics/icons/ptpd-catalyst.png",
icon_size = 128,
pictures = {
{filename="__bzgold__/graphics/icons/ptpd-catalyst.png", size=128, scale=0.125},
{filename="__bzgold__/graphics/icons/ptpd-catalyst-1.png", size=128, scale=0.125},
{filename="__bzgold__/graphics/icons/ptpd-catalyst-2.png", size=128, scale=0.125},
{filename="__bzgold__/graphics/icons/ptpd-catalyst-3.png", size=128, scale=0.125},
{filename="__bzgold2__/graphics/icons/ptpd-catalyst.png", size=128, scale=0.25},
{filename="__bzgold2__/graphics/icons/ptpd-catalyst-1.png", size=128, scale=0.25},
{filename="__bzgold2__/graphics/icons/ptpd-catalyst-2.png", size=128, scale=0.25},
{filename="__bzgold2__/graphics/icons/ptpd-catalyst-3.png", size=128, scale=0.25},
},
subgroup = "intermediate-product",
order = "b[catalyst]",
stack_size = util.get_stack_size(100),
stack_size = 100,
},
{
type = "technology",
@ -27,7 +27,7 @@ if util.me.catalysis() then
icon_size = 256,
},
{
icon = "__bzgold__/graphics/icons/ptpd-catalyst.png",
icon = "__bzgold2__/graphics/icons/ptpd-catalyst.png",
icon_size = 128, shift={0,20}
},
},
@ -49,7 +49,7 @@ if util.me.catalysis() then
local base = "stone"
if mods.bzaluminum then base = "alumina"
if mods.bzaluminum2 then base = "alumina"
elseif mods.bzsilicon then base = "silica"
end
@ -62,20 +62,21 @@ if util.me.catalysis() then
{
type = "recipe",
name = "pd-catalyst",
localised_name = {"item-name.ptpd-catalyst"},
main_product = "ptpd-catalyst",
category = "chemistry",
order = "d[catalyst]",
enabled = false,
energy_required = 1.6,
ingredients = {
{base, 1},
{"palladium-ingot", 1},
{type="fluid", name=fluid, amount=100, catalyst_amount=100},
{type="item", name=base, amount=1},
{type="item", name="palladium-ingot", amount=1},
{type="fluid", name=fluid, amount=100, ignored_by_productivity=100},
},
results = {
{"ptpd-catalyst", 1},
{type="fluid", name=fluid, amount=90, catalyst_amount=90},
{type="fluid", name="water", amount=10, catalyst_amount=9},
{type="item", name="ptpd-catalyst", amount=1},
{type="fluid", name=fluid, amount=90, ignored_by_productivity=90},
{type="fluid", name="water", amount=10, ignored_by_productivity=9},
},
},
})
@ -85,20 +86,21 @@ if util.me.catalysis() then
{
type = "recipe",
name = "pt-catalyst",
localised_name = {"item-name.ptpd-catalyst"},
main_product = "ptpd-catalyst",
category = "chemistry",
order = "d[catalyst]",
enabled = false,
energy_required = 1.6,
ingredients = {
{base, 1},
{"platinum-ingot", 1},
{type="fluid", name=fluid, amount=100, catalyst_amount=100},
{type="item", name=base, amount=1},
{type="item", name="platinum-ingot", amount=1},
{type="fluid", name=fluid, amount=100, ignored_by_productivity=100},
},
results = {
{"ptpd-catalyst", 1},
{type="fluid", name=fluid, amount=90, catalyst_amount=90},
{type="fluid", name="water", amount=10, catalyst_amount=9},
{type="item", name="ptpd-catalyst", amount=1},
{type="fluid", name=fluid, amount=90, ignored_by_productivity=90},
{type="fluid", name="water", amount=10, ignored_by_productivity=9},
},
},
})

View file

@ -0,0 +1,65 @@
local util = require("data-util");
local silicon = {type="item", name="stone", amount=30}
if mods.bzsilicon then
silicon = data.raw.item["silicon-wafer"] and {type="item", name="silicon-wafer", amount=30} or {type="item", name=mods.Krastorio2 and "kr-silicon" or "silicon", amount=15}
elseif mods.Krastorio2 then
silicon = data.raw.item["silicon-wafer"] and {type="item", name="silicon-wafer", amount=30} or {type="item", name="kr-silicon", amount=15}
elseif data.raw.item["sand"] then
silicon = {type="item", name="sand", amount=30}
end
local spreader = data.raw.item["cuw"] and {type="item", name="cuw", amount=2} or {type="item", name="copper-plate", amount=2}
data:extend({
{
type = "item",
name = "cpu",
icon = "__base__/graphics/technology/advanced-circuit.png",
icon_size = 256,
subgroup = "intermediate-product",
order = "b[cpu]",
stack_size = 200,
},
{
type = "recipe",
name = "cpu",
category = "crafting-with-fluid",
order = "d[cpu]",
enabled = false,
energy_required = 50,
ingredients = {
silicon, spreader, {type="item", name="gold-ingot", amount=1}, {type="item", name="electronic-circuit", amount=10},
{type="fluid", name="sulfuric-acid", amount=50},
},
results = {{type="item", name="cpu", amount=10}},
},
})
if mods["space-exploration"] then
local cpui = {}
if mods.Krastorio2 then
cpui = {{type="item", name="se-holmium-cable", amount=2}, silicon, spreader, {type="item", name="electronic-circuit", amount=20}, {type="item", name="gold-ingot", amount=1},
{type="fluid", name="sulfuric-acid", amount=50}}
else
cpui = {{type="item", name="se-holmium-cable", amount=1}, silicon, spreader, {type="item", name="electronic-circuit", amount=20}, {type="item", name="gold-ingot", amount=1},
{type="fluid", name="sulfuric-acid", amount=50}}
end
data:extend({
{
type = "recipe",
name = "cpu-holmium",
icons = {
{ icon = "__base__/graphics/technology/advanced-circuit.png", icon_size = 256, },
{ icon = "__space-exploration-graphics__/graphics/icons/holmium-solenoid.png", icon_size = 64, scale=.25, shift={-8, -8} },
},
category = "crafting-with-fluid",
order = "d[cpu]",
enabled = false,
energy_required = 50,
ingredients = cpui,
results = {{type="item", name="cpu", amount=20}},
},
})
end
util.replace_ingredient("cpu", "electronic-circuit", "pcb", 10, false, {"force", true})
util.replace_ingredient("cpu-holmium", "electronic-circuit", "pcb", 20, false, {"force", true})

View file

@ -3,20 +3,30 @@ local util = require("data-util");
if util.me.silver() then
if mods.bobelectronics then
-- alternate electronic circuit recipe that uses silver
if mods.bobelectronics or mods.MDbobelectronics or mods.MDbobelectronics2 then
-- alternate electronic component recipe that uses silver
local ec = futil.table.deepcopy(data.raw.recipe["basic-electronic-components"])
ec.name = "basic-electronic-components-silver"
data:extend({ec})
util.set_enabled("basic-electronic-components-silver", false)
util.replace_ingredient("basic-electronic-components-silver", "copper-cable", "silver-wire")
util.add_icon("basic-electronic-components-silver", {
icon = "__bzgold__/graphics/icons/silver-wire.png",
local bec_icon = {
icon = data.raw.item["basic-electronic-components"].icon,
icon_size = data.raw.item["basic-electronic-components"].icon_size
}
util.set_icons("basic-electronic-components-silver", {
bec_icon,
{
icon = "__bzgold2__/graphics/icons/silver-wire.png",
icon_size = 64, icon_mipmaps = 4, scale = 0.3, shift = {-8,-8}
}
})
util.add_icon("basic-electronic-components", {
util.set_icons("basic-electronic-components", {
bec_icon,
{
icon = "__base__/graphics/icons/copper-cable.png",
icon_size = 64, icon_mipmaps = 4, scale = 0.3, shift = {-8,-8}
}
})
util.add_unlock("electronics", "basic-electronic-components-silver")
else
@ -24,32 +34,32 @@ if util.me.silver() then
util.set_main_product("electronic-circuit", "electronic-circuit")
local ec = futil.table.deepcopy(data.raw.recipe["electronic-circuit"])
ec.name = "electronic-circuit-silver"
ec.localised_name = {"item-name.electronic-circuit"}
ec.icons = {
{ icon = "__base__/graphics/icons/electronic-circuit.png" },
{ icon = "__bzgold2__/graphics/icons/silver-wire.png", scale = 0.3, shift = {8,-8} }
}
data:extend({ec})
util.set_enabled("electronic-circuit-silver", false)
util.replace_ingredient("electronic-circuit-silver", "copper-cable", "silver-wire")
util.add_icon("electronic-circuit-silver", {
icon = "__bzgold__/graphics/icons/silver-wire.png",
icon_size = 64, icon_mipmaps = 4, scale = 0.3, shift = {8,-8}
})
util.add_icon("electronic-circuit", {
icon = "__base__/graphics/icons/copper-cable.png",
icon_size = 64, icon_mipmaps = 4, scale = 0.3, shift = {8,-8}
})
data.raw.recipe["electronic-circuit"].icons = {
{ icon = "__base__/graphics/icons/electronic-circuit.png" },
{ icon = "__base__/graphics/icons/copper-cable.png", scale = 0.3, shift = {8,-8} }
}
if util.check_unlock("electronics", "electronic-circuit") then
util.add_unlock("electronics", "electronic-circuit-silver")
else
util.add_unlock("silver-processing", "electronic-circuit-silver")
end
if mods["aai-industry"] and not mods.bzgas then
util.set_main_product("electronic-circuit-stone", "electronic-circuit")
local ec2 = futil.table.deepcopy(data.raw.recipe["electronic-circuit-stone"])
if mods["aai-industry"] and not mods.bzgas2 then
local ec2 = futil.table.deepcopy(data.raw.recipe["electronic-circuit"])
ec2.name = "electronic-circuit-stone-silver"
data:extend({ec2})
util.set_enabled("electronic-circuit-stone-silver", false)
util.replace_ingredient("electronic-circuit-stone-silver", "copper-cable", "silver-wire")
util.add_icon("electronic-circuit-stone-silver", {
icon = "__bzgold__/graphics/icons/silver-wire.png",
icon = "__bzgold2__/graphics/icons/silver-wire.png",
icon_size = 64, icon_mipmaps = 4, scale = 0.3, shift = {8,-8}
})
util.add_icon("electronic-circuit-stone-silver", {
@ -60,11 +70,11 @@ if util.me.silver() then
icon = "__base__/graphics/icons/copper-cable.png",
icon_size = 64, icon_mipmaps = 4, scale = 0.3, shift = {8,-8}
})
util.add_icon("electronic-circuit-stone", {
util.add_icon("electronic-circuit", {
icon = "__aai-industry__/graphics/icons/stone-tablet.png",
icon_size = 64, scale = 0.3, shift = {-8,-8}
})
if util.check_unlock("electronics", "electronic-circuit-stone") then
if util.check_unlock("electronics", "electronic-circuit") then
util.add_unlock("electronics", "electronic-circuit-stone-silver")
else
util.add_unlock("silver-processing", "electronic-circuit-stone-silver")

View file

@ -6,10 +6,10 @@ local enrich_results =
util.me.silver() and {
{type = "item", name = "enriched-gold", amount = 5},
{type = "item", name = "enriched-silver", amount = 1},
{type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25}
{type = "fluid", name = "kr-dirty-water", amount = 25, ignored_by_productivity = 25}
} or {
{type = "item", name = "enriched-gold", amount = 6},
{type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25}
{type = "fluid", name = "kr-dirty-water", amount = 25, ignored_by_productivity = 25}
}
data:extend({
@ -17,16 +17,16 @@ data:extend({
type = "item",
name = "enriched-gold",
icon_size = 128,
icon = "__bzgold__/graphics/icons/enriched-gold.png",
icon = "__bzgold2__/graphics/icons/enriched-gold.png",
-- pictures = {
-- {filename="__bzgold__/graphics/icons/enriched-gold.png", size=64, scale=0.25},
-- {filename="__bzgold__/graphics/icons/enriched-gold-2.png", size=64, scale=0.25},
-- {filename="__bzgold__/graphics/icons/enriched-gold-3.png", size=64, scale=0.25},
-- {filename="__bzgold__/graphics/icons/enriched-gold-4.png", size=64, scale=0.25},
-- {filename="__bzgold__/graphics/icons/enriched-gold.png", size=64, scale=0.5},
-- {filename="__bzgold__/graphics/icons/enriched-gold-2.png", size=64, scale=0.5},
-- {filename="__bzgold__/graphics/icons/enriched-gold-3.png", size=64, scale=0.5},
-- {filename="__bzgold__/graphics/icons/enriched-gold-4.png", size=64, scale=0.5},
-- },
subgroup = "raw-material",
order = "e05-a[enriched-ores]-a1[enriched-gold]",
stack_size = util.get_stack_size(100),
stack_size = 100,
},
{
type = "recipe",
@ -43,8 +43,8 @@ data:extend({
subgroup = "raw-material",
ingredients =
{
{type = "fluid", name = "chlorine", amount = 15},
{type = "fluid", name = "water", amount = 25, catalyst_amount = 25},
{type = "fluid", name = "kr-chlorine", amount = 15},
{type = "fluid", name = "water", amount = 25, ignored_by_productivity = 25},
{type = "item", name = "gold-ore", amount = 9}
},
results = enrich_results,
@ -60,6 +60,7 @@ data:extend({
{
type = "recipe",
name = "enriched-gold-ingot",
localised_name = {"item-name.enriched-gold"},
icons =
{
{ icon = "__bzgold__/graphics/icons/gold-ingot.png", icon_size = 128, icon_mipmaps = 3, },
@ -73,30 +74,29 @@ data:extend({
allow_productivity = true,
ingredients =
{
{"enriched-gold", 20}
{type="item", name="enriched-gold", amount=20}
},
result = "gold-ingot",
result_count = 10,
results = {{type="item", name="gold-ingot", amount=10}},
order = "b[gold-ingot]-b[enriched-gold-ingot]"
},
{
type = "recipe",
name = "dirty-water-filtration-gold",
category = "fluid-filtration",
category = "kr-fluid-filtration",
icons =
{
{
icon = data.raw.fluid["dirty-water"].icon,
icon_size = data.raw.fluid["dirty-water"].icon_size
icon = data.raw.fluid["kr-dirty-water"].icon,
icon_size = data.raw.fluid["kr-dirty-water"].icon_size
},
{
icon = data.raw.item["gold-ore"].icon,
icon_size = data.raw.item["gold-ore"].icon_size,
scale = 0.20 * (data.raw.fluid["dirty-water"].icon_size/data.raw.item["gold-ore"].icon_size),
scale = 0.2,
shift = {0, 4}
}
},
icon_size = data.raw.fluid["dirty-water"].icon_size,
icon_size = data.raw.fluid["kr-dirty-water"].icon_size,
energy_required = 2,
enabled = false,
allow_as_intermediate = false,
@ -104,11 +104,11 @@ data:extend({
always_show_products = true,
ingredients =
{
{type = "fluid", name = "dirty-water", amount = 100, catalyst_amount = 100},
{type = "fluid", name = "kr-dirty-water", amount = 100, ignored_by_productivity = 100},
},
results =
{
{type = "fluid", name = "water", amount = 90, catalyst_amount = 90},
{type = "fluid", name = "water", amount = 90, ignored_by_productivity = 90},
{type = "item", name = "stone", probability = 0.30, amount = 1},
{type = "item", name = "gold-ore", probability = 0.05, amount = 1}
},

View file

@ -8,14 +8,14 @@ data:extend({
icon_size = 128,
icon = "__bzgold__/graphics/icons/enriched-silver.png",
-- pictures = {
-- {filename="__bzgold__/graphics/icons/enriched-silver.png", size=64, scale=0.25},
-- {filename="__bzgold__/graphics/icons/enriched-silver-2.png", size=64, scale=0.25},
-- {filename="__bzgold__/graphics/icons/enriched-silver-3.png", size=64, scale=0.25},
-- {filename="__bzgold__/graphics/icons/enriched-silver-4.png", size=64, scale=0.25},
-- {filename="__bzgold__/graphics/icons/enriched-silver.png", size=64, scale=0.5},
-- {filename="__bzgold__/graphics/icons/enriched-silver-2.png", size=64, scale=0.5},
-- {filename="__bzgold__/graphics/icons/enriched-silver-3.png", size=64, scale=0.5},
-- {filename="__bzgold__/graphics/icons/enriched-silver-4.png", size=64, scale=0.5},
-- },
subgroup = "raw-material",
order = "e05-a[enriched-ores]-a1[enriched-silver]",
stack_size = util.get_stack_size(100),
stack_size = 100,
},
})
@ -25,24 +25,24 @@ if util.me.platinum() and util.me.palladium() then
{type = "item", name = "enriched-silver", amount = 5},
{type = "item", name = "platinum-powder", amount = 1, probability=0.5},
{type = "item", name = "palladium-powder", amount = 1, probability=0.5},
{type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25}
{type = "fluid", name = "kr-dirty-water", amount = 25, ignored_by_productivity = 25}
}
elseif util.me.platinum() then
enrich_results = {
{type = "item", name = "enriched-silver", amount = 5},
{type = "item", name = "platinum-powder", amount = 1},
{type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25}
{type = "fluid", name = "kr-dirty-water", amount = 25, ignored_by_productivity = 25}
}
elseif util.me.palladium() then
enrich_results = {
{type = "item", name = "enriched-silver", amount = 5},
{type = "item", name = "palladium-powder", amount = 1},
{type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25}
{type = "fluid", name = "kr-dirty-water", amount = 25, ignored_by_productivity = 25}
}
else
enrich_results = {
{type = "item", name = "enriched-silver", amount = 6},
{type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25}
{type = "fluid", name = "kr-dirty-water", amount = 25, ignored_by_productivity = 25}
}
end
@ -63,7 +63,7 @@ data:extend({
ingredients =
{
{type = "fluid", name = "sulfuric-acid", amount = 10},
{type = "fluid", name = "water", amount = 25, catalyst_amount = 25},
{type = "fluid", name = "water", amount = 25, ignored_by_productivity = 25},
{type = "item", name = "silver-ore", amount = 9}
},
results = enrich_results,
@ -79,6 +79,7 @@ data:extend({
{
type = "recipe",
name = "enriched-silver-plate",
localised_name = {"item-name.enriched-silver"},
icons =
{
{ icon = "__bzgold__/graphics/icons/silver-plate.png", icon_size = 128, icon_mipmaps = 3, },
@ -92,30 +93,29 @@ data:extend({
allow_productivity = true,
ingredients =
{
{"enriched-silver", 10}
{type="item", name="enriched-silver", amount=10}
},
result = "silver-plate",
result_count = 10,
results = {{type="item", name="silver-plate", amount=10}},
order = "b[silver-plate]-b[enriched-silver-plate]"
},
{
type = "recipe",
name = "dirty-water-filtration-silver",
category = "fluid-filtration",
category = "kr-fluid-filtration",
icons =
{
{
icon = data.raw.fluid["dirty-water"].icon,
icon_size = data.raw.fluid["dirty-water"].icon_size
icon = data.raw.fluid["kr-dirty-water"].icon,
icon_size = data.raw.fluid["kr-dirty-water"].icon_size
},
{
icon = data.raw.item["silver-ore"].icon,
icon_size = data.raw.item["silver-ore"].icon_size,
scale = 0.20 * (data.raw.fluid["dirty-water"].icon_size/data.raw.item["silver-ore"].icon_size),
scale = 0.2,
shift = {0, 4}
}
},
icon_size = data.raw.fluid["dirty-water"].icon_size,
icon_size = data.raw.fluid["kr-dirty-water"].icon_size,
energy_required = 2,
enabled = false,
allow_as_intermediate = false,
@ -123,11 +123,11 @@ data:extend({
always_show_products = true,
ingredients =
{
{type = "fluid", name = "dirty-water", amount = 100, catalyst_amount = 100},
{type = "fluid", name = "kr-dirty-water", amount = 100, ignored_by_productivity = 100},
},
results =
{
{type = "fluid", name = "water", amount = 90, catalyst_amount = 90},
{type = "fluid", name = "water", amount = 90, ignored_by_productivity = 90},
{type = "item", name = "stone", probability = 0.30, amount = 1},
{type = "item", name = "silver-ore", probability = 0.05, amount = 1}
},

View file

@ -0,0 +1,180 @@
local resource_autoplace = require('resource-autoplace');
local item_sounds = require('__base__.prototypes.item_sounds')
local util = require("data-util");
data.raw.planet.nauvis.map_gen_settings.autoplace_controls["gold-ore"] = {}
data.raw.planet.nauvis.map_gen_settings.autoplace_settings.entity.settings["gold-ore"] = {}
resource_autoplace.initialize_patch_set("gold-ore", true)
data:extend({
{
type = "autoplace-control",
category = "resource",
name = "gold-ore",
richness = true,
order = "b-e"
},
{
type = "resource",
name = "gold-ore",
icon = "__bzgold__/graphics/icons/gold-ore.png",
icon_size = 128,
flags = {"placeable-neutral"},
order="a-b-a",
map_color = {r=1.00, g=0.90, b=0.10},
tree_removal_probability = 0.7,
tree_removal_max_distance = 32 * 32,
minable =
{
hardness = 1,
mining_particle = "gold-ore-particle",
mining_time = 1,
results =
util.se6() and
{
{type="item", name="gold-ore", amount=1, probability=.75},
{type="item", name="stone", amount=1, probability=.25},
} or
{
{type="item", name="gold-ore", amount=1, probability=.25},
{type="item", name="stone", amount=1, probability=.75},
}
},
collision_box = {{ -0.1, -0.1}, {0.1, 0.1}},
selection_box = {{ -0.5, -0.5}, {0.5, 0.5}},
autoplace = resource_autoplace.resource_autoplace_settings{
name = "gold-ore",
order = "b-z",
base_density = 1,
base_spots_per_km2 = 1,
has_starting_area_placement = false,
regular_rq_factor_multiplier = 1,
starting_rq_factor_multiplier = 1,
},
stage_counts = {15000, 9500, 5500, 2900, 1300, 400, 150, 80},
stages =
{
sheet =
{
filename = "__bzgold__/graphics/entity/ores/hr-gold-ore.png",
priority = "extra-high",
size = 128,
frame_count = 8,
variation_count = 8,
scale = 0.5
}
},
},
{
type = "item",
name = "gold-ore",
icon_size = 128,
icon = "__bzgold__/graphics/icons/gold-ore.png",
pictures = {
{filename="__bzgold__/graphics/icons/gold-ore.png", size=128, scale=0.25},
{filename="__bzgold__/graphics/icons/gold-ore-1.png", size=128, scale=0.25},
{filename="__bzgold__/graphics/icons/gold-ore-2.png", size=128, scale=0.25},
{filename="__bzgold__/graphics/icons/gold-ore-3.png", size=128, scale=0.25},
{filename="__bzgold__/graphics/icons/gold-ore-4.png", size=128, scale=0.25},
},
subgroup = "raw-resource",
order = "a-a-a",
stack_size = 50,
weight = 20*kg,
inventory_move_sound = item_sounds.resource_inventory_move,
pick_sound = item_sounds.resource_inventory_pickup,
drop_sound = item_sounds.resource_inventory_move,
},
})
if util.se6() then
se_resources["gold-ore"] = {
order = "b-z-g",
has_starting_area_placement = false,
base_density = 1,
base_spots_per_km2 = 1,
}
end
data:extend({
{
type = "optimized-particle",
name = "gold-ore-particle",
flags = {"not-on-map"},
life_time = 180,
pictures =
{
{
filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-1.png",
priority = "extra-high",
width = 32,
height = 32,
frame_count = 1,
scale = 0.5
},
{
filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-2.png",
priority = "extra-high",
width = 32,
height = 32,
frame_count = 1,
scale = 0.5
},
{
filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-3.png",
priority = "extra-high",
width = 32,
height = 32,
frame_count = 1,
scale = 0.5
},
{
filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-4.png",
priority = "extra-high",
width = 32,
height = 32,
frame_count = 1,
scale = 0.5
}
},
shadows =
{
{
filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-1.png",
priority = "extra-high",
width = 32,
height = 32,
frame_count = 1,
scale = 0.5
},
{
filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-2.png",
priority = "extra-high",
width = 32,
height = 32,
frame_count = 1,
scale = 0.5
},
{
filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-3.png",
priority = "extra-high",
width = 32,
height = 32,
frame_count = 1,
scale = 0.5
},
{
filename = "__bzgold__/graphics/entity/ores/particle/hr-gold-ore-particle-shadow-4.png",
priority = "extra-high",
width = 32,
height = 32,
frame_count = 1,
scale = 0.5
}
}
}
})

View file

@ -8,7 +8,7 @@ data:extend({
icon_size = 128,
subgroup = "raw-resource",
order = "b[gold-ingot]",
stack_size = util.get_stack_size(100),
stack_size = 100,
},
{
type = "technology",
@ -42,7 +42,7 @@ data:extend({
})
if mods.Krastorio2 then
local results = {{"gold-ingot", 5}}
local results = {{type="item", name="gold-ingot", amount=5}}
if util.me.silver() and util.me.byproduct() then
results = {
{type = "item", name="gold-ingot", amount=4},
@ -58,12 +58,12 @@ if mods.Krastorio2 then
order = "d[gold-ingot]",
enabled = false,
energy_required = 8,
ingredients = {{"gold-ore", 20}},
ingredients = {{type="item", name="gold-ore", amount=20}},
results = results,
},
})
else
local results = {{"gold-ingot", 1}}
local results = {{type="item", name="gold-ingot", amount=1}}
if util.me.silver() and util.me.byproduct() then
results = {
{type = "item", name="gold-ingot", amount=1, probability=.9},
@ -80,7 +80,7 @@ else
order = "d[gold-ingot]",
enabled = false,
energy_required = 1.6,
ingredients = {{"gold-ore", 2}},
ingredients = {{type="item", name="gold-ore", amount=2}},
results = results,
},
})

View file

@ -1,7 +1,7 @@
local util = require("data-util");
if not mods.bobelectronics then
if not (mods.bobelectronics or mods.MDbobelectronics or mods.MDbobelectronics2) then
data:extend({
{
@ -11,7 +11,7 @@ if not mods.bobelectronics then
icon_size = 128,
subgroup = "intermediate-product",
order = "b[mainboard]",
stack_size = util.get_stack_size(200),
stack_size = 200,
},
{
type = "recipe",
@ -20,8 +20,8 @@ if not mods.bobelectronics then
order = "d[mainboard]",
enabled = false,
energy_required = 2.5,
ingredients = {{"advanced-circuit", 10}, {"gold-ingot", 1}},
results = {{"mainboard", 10}},
ingredients = {{type="item", name="advanced-circuit", amount=10}, {type="item", name="gold-ingot", amount=1}},
results = {{type="item", name="mainboard", amount=10}},
},
})
@ -38,8 +38,8 @@ if not mods.bobelectronics then
order = "d[mainboard]",
enabled = false,
energy_required = 5,
ingredients = {{"se-holmium-cable", 2}, {"advanced-circuit", 20}, {"gold-ingot", 1}},
results = {{"mainboard", 20}},
ingredients = {{type="item", name="se-holmium-cable", amount=2}, {type="item", name="advanced-circuit", amount=20}, {type="item", name="gold-ingot", amount=1}},
results = {{type="item", name="mainboard", amount=20}},
},
})
end
@ -54,8 +54,8 @@ if not mods.bobelectronics then
util.add_ingredient("mainboard-holmium", "mlcc", 10, {"force", true})
end
if mods.Krastorio2 then
util.add_ingredient("mainboard", "rare-metals", 20, {"force", true})
util.add_ingredient("mainboard-holmium", "rare-metals", 20, {"force", true})
util.add_ingredient("mainboard", "kr-rare-metals", 20, {"force", true})
util.add_ingredient("mainboard-holmium", "kr-rare-metals", 20, {"force", true})
end
else

View file

@ -2,17 +2,19 @@ local util = require("data-util");
if util.me.palladium() then
local ingredients = {{"palladium-ingot", 1}, {"stone", 2}}
if mods.bzzirconium and mods.bzaluminum then
ingredients = {{"palladium-ingot", 1}, {"zirconia", 1}, {"alumina", 1}}
local ingredients = {{type="item", name="palladium-ingot", amount=1}, {type="item", name="stone", amount=2}}
if mods.bzzirconium and mods.bzaluminum2 then
ingredients = {{type="item", name="palladium-ingot", amount=1}, {type="item", name="zirconia", amount=1}, {type="item", name="alumina", amount=1}}
elseif mods.bzzirconium then
ingredients = {{"palladium-ingot", 1}, {"zirconia", 2}}
elseif mods.bzaluminum then
ingredients = {{"palladium-ingot", 1}, {"alumina", 2}}
ingredients = {{type="item", name="palladium-ingot", amount=1}, {type="item", name="zirconia", amount=2}}
elseif mods.bzaluminum2 then
ingredients = {{type="item", name="palladium-ingot", amount=1}, {type="item", name="alumina", amount=2}}
elseif mods.bzsilicon then
ingredients = {{"palladium-ingot", 1}, {"silica", 3}}
elseif mods.Krastorio2 or mods["aai-industry"] or mods["sand-and-glass"] then
ingredients = {{"palladium-ingot", 1}, {"sand", 2}}
ingredients = {{type="item", name="palladium-ingot", amount=1}, {type="item", name="silica", amount=3}}
elseif mods.Krastorio2 then
ingredients = {{type="item", name="palladium-ingot", amount=1}, {type="item", name="kr-sand", amount=2}}
elseif mods["aai-industry"] or mods["sand-and-glass"] then
ingredients = {{type="item", name="palladium-ingot", amount=1}, {type="item", name="sand", amount=2}}
end
data:extend({
@ -35,7 +37,7 @@ data:extend({
},
subgroup = "intermediate-product",
order = "b[gold-ingot]",
stack_size = util.get_stack_size(100),
stack_size = 100,
},
{
type = "recipe",
@ -45,7 +47,7 @@ data:extend({
enabled = false,
energy_required = 4,
ingredients = ingredients,
results = {{"mlcc", 10}},
results = {{type="item", name="mlcc", amount=10}},
},
{
type = "technology",

View file

@ -32,7 +32,7 @@ for i, recipe_name in pairs(recipes_to_update) do
data:extend({r})
util.add_ingredient(new_name, "ptpd-catalyst", 1, {force=true})
util.add_product(new_name, {type="item", name="ptpd-catalyst", amount=1,
catalyst_amount=1, probability=.9}, {force=true})
ignored_by_productivity=1, probability=.9}, {force=true})
util.add_icon(new_name, {icon="__bzgold__/graphics/icons/ptpd-catalyst.png",
icon_size=128, scale=0.124, shift={8,-8}})

View file

@ -9,7 +9,7 @@ data:extend({
icon_size = 64,
subgroup = "raw-resource",
order = "b[palladium-powder]",
stack_size = util.get_stack_size(100),
stack_size = 100,
},
{
type = "item",
@ -18,7 +18,7 @@ data:extend({
icon_size = 128,
subgroup = "raw-resource",
order = "b[palladium-ingot]",
stack_size = util.get_stack_size(100),
stack_size = 100,
},
{
type = "recipe",
@ -28,12 +28,12 @@ data:extend({
order = "d[palladium-ingot]",
enabled = false,
energy_required = 1.6,
ingredients = {{"palladium-powder", 1}},
ingredients = {{type="item", name="palladium-powder", amount=1}},
results = util.me.byproduct() and
{
{type="item", name="palladium-ingot", amount=1, probability=0.95},
{type="item", name="sulfur", amount=1, probability=0.05},
} or {{"palladium-ingot", 1}},
} or {{type="item", name="palladium-ingot", amount=1}},
},
})
data:extend({
@ -85,8 +85,8 @@ data:extend({
order = "d[palladium-ingot]",
enabled = false,
energy_required = 5,
ingredients = {{"palladium-ingot", 1}, {util.titanium_plate, 4}},
results = {{"titanium-palladium-flange", 5}},
ingredients = {{type="item", name="palladium-ingot", amount=1}, {type="item", name=util.titanium_plate, amount=4}},
results = {{type="item", name="titanium-palladium-flange", amount=5}},
},
})
util.add_unlock("palladium-processing", "titanium-palladium-flange")

View file

@ -9,7 +9,7 @@ data:extend({
icon_size = 64,
subgroup = "raw-resource",
order = "b[platinum-powder]",
stack_size = util.get_stack_size(100),
stack_size = 100,
},
{
type = "item",
@ -18,7 +18,7 @@ data:extend({
icon_size = 128,
subgroup = "raw-resource",
order = "b[platinum-ingot]",
stack_size = util.get_stack_size(100),
stack_size = 100,
},
{
type = "recipe",
@ -28,12 +28,12 @@ data:extend({
order = "d[platinum-ingot]",
enabled = false,
energy_required = 1.6,
ingredients = {{"platinum-powder", 1}},
ingredients = {{type="item", name="platinum-powder", amount=1}},
results = util.me.byproduct() and
{
{type="item", name="platinum-ingot", amount=1, probability=0.95},
{type="item", name="sulfur", amount=1, probability=0.05},
} or {{"platinum-ingot", 1}},
} or {{type="item", name="platinum-ingot", amount=1}},
},
})
data:extend({

View file

@ -1,11 +1,11 @@
local util = require("data-util")
util.remove_ingredient("processing-unit", "silicon")
util.remove_ingredient("processing-unit", mods.Krastorio2 and "kr-silicon" or "silicon")
util.remove_ingredient("processing-unit", "silicon-wafer")
util.remove_ingredient("processing-unit", "sulfuric-acid")
util.remove_ingredient("processing-unit", "electronic-circuit")
util.remove_ingredient("processing-unit", "advanced-circuit")
util.remove_ingredient("processing-unit", "rare-metals") -- k2
util.remove_ingredient("processing-unit", "kr-rare-metals") -- k2
util.add_ingredient("processing-unit", "cpu", 1)
util.set_recipe_time("processing-unit", 2)
util.add_ingredient("processing-unit", "mainboard", 1)

View file

@ -28,7 +28,7 @@ if util.se6() then
},
energy_required = 60,
ingredients = {
{name = mods.Krastorio2 and "enriched-gold" or "gold-ore", amount = 24},
{type = "item", name = mods.Krastorio2 and "enriched-gold" or "gold-ore", amount = 24},
{type = "fluid", name = "se-pyroflux", amount = 10},
},
enabled = false,
@ -40,7 +40,7 @@ if util.se6() then
type = "recipe",
name = "gold-ingot-casting",
category = "casting",
results = {{"gold-ingot", 1}},
results = {{type="item", name="gold-ingot", amount=1}},
energy_required = 2.5,
ingredients = {
{type = "fluid", name = "molten-gold", amount = 50},
@ -57,6 +57,6 @@ if util.se6() then
data.raw.recipe["enriched-gold-ingot"].order = "d[gold-ingot]"
se_delivery_cannon_recipes["enriched-gold"] = {name= "enriched-gold"}
else
if util.me.byproduct() then util.add_product("molten-gold", {"silver-ore", 9}) end
if util.me.byproduct() then util.add_product("molten-gold", {type="item", name="silver-ore", amount=9}) end
end
end

View file

@ -35,7 +35,7 @@ if util.se6() and util.me.silver() then
},
energy_required = 60,
ingredients = {
{name = mods.Krastorio2 and "enriched-silver" or "silver-ore", amount = 24},
{type = "item", name = mods.Krastorio2 and "enriched-silver" or "silver-ore", amount = 24},
{type = "fluid", name = "se-pyroflux", amount = 10},
},
enabled = false,
@ -47,7 +47,7 @@ if util.se6() and util.me.silver() then
type = "recipe",
name = "silver-ingot",
category = "casting",
results = {{"silver-ingot", 1}},
results = {{type="item", name="silver-ingot", amount=1}},
energy_required = 25,
ingredients = {
{type = "fluid", name = "molten-silver", amount = 250},
@ -66,11 +66,11 @@ if util.se6() and util.me.silver() then
{icon = "__bzgold__/graphics/icons/silver-ingot.png", icon_size = 128, scale = 0.125, shift = {-8, -8}},
},
results = {
{name = "silver-plate", amount = 10},
{type = "item", name = "silver-plate", amount = 10},
},
energy_required = 5,
ingredients = {
{name = "silver-ingot", amount = 1}
{type = "item", name = "silver-ingot", amount = 1}
},
enabled = false,
always_show_made_in = true,

View file

@ -12,7 +12,7 @@ if util.se6() then
util.replace_ingredient("se-space-science-lab", "processing-unit", "advanced-circuit", 100)
util.replace_ingredient("se-empty-lifesupport-canister", "processing-unit", "advanced-circuit", 5)
util.remove_prerequisite("se-meteor-defence", "advanced-electronics-2")
util.remove_prerequisite("se-meteor-defence", "processing-unit")
util.add_prerequisite("se-meteor-defence", "se-rocket-science-pack")
util.set_tech_recipe("se-meteor-defence", {
{"automation-science-pack", 1},

View file

@ -4,7 +4,7 @@ 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})
util.add_product("enriched-copper", {type="item", name="silver-ore", amount=1})
end
if mods.bztitanium then
@ -63,19 +63,19 @@ util.add_ingredient("kr-quantum-computer", "mlcc", 50)
if util.me.palladium() then
util.add_ingredient("additional-engine", "palladium-ingot", 1)
util.add_ingredient("kr-additional-engine-equipment", "palladium-ingot", 1)
elseif util.me.platinum() then
util.add_ingredient("additional-engine", "platinum-ingot", 1)
util.add_ingredient("kr-additional-engine-equipment", "platinum-ingot", 1)
end
-- K2 blank tech card
if mods.Krastorio2 and util.me.silver() then
local tc = futil.table.deepcopy(data.raw.recipe["blank-tech-card"])
local tc = futil.table.deepcopy(data.raw.recipe["kr-blank-tech-card"])
tc.name = "blank-tech-card-silver"
data:extend({tc})
util.replace_ingredient("blank-tech-card-silver", "copper-cable", "silver-wire")
local amt = util.get_amount("blank-tech-card")
util.set_product_amount("blank-tech-card-silver", "blank-tech-card", amt)
local amt = util.get_amount("kr-blank-tech-card")
util.set_product_amount("blank-tech-card-silver", "kr-blank-tech-card", amt)
util.add_icon("blank-tech-card-silver", {
icon = "__bzgold__/graphics/icons/silver-wire.png",
icon_size = 64, icon_mipmaps = 4, scale = 0.25, shift = {8,-8}

Some files were not shown because too many files have changed in this diff Show more