This commit is contained in:
Brevven 2025-04-07 21:14:21 -07:00
parent 6d4513d783
commit 7d383717d1
13 changed files with 181 additions and 96 deletions

View file

@ -1,13 +1,37 @@
---------------------------------------------------------------------------------------------------
Version: 2.0.11
Date: 2025-03-23
Fixes:
- Fix when used without space age.
---------------------------------------------------------------------------------------------------
Version: 2.0.10
Date: 2025-03-22
Changes:
- Set inventory sounds for some items
Fixes:
- Loads with Crafting Efficiency
- Improved compatibility with Muluna
---------------------------------------------------------------------------------------------------
Version: 2.0.9
Date: 2025-03-21
Fixes:
- Fix startup crash introduced in Factorio 2.0.42
---------------------------------------------------------------------------------------------------
Version: 2.0.8
Date: 2025-02-17
Date: 2025-03-11
Fixes:
- Improve compatibility with glass: silica comes from sand when generic sand is available.
- Minor locale fixes
Changes:
- Space Age: When enabled, add a handcrafting recipe for silicon wafers
- Make wafers in smaller batches (ratio unchanged)
---------------------------------------------------------------------------------------------------
Version: 2.0.7
Date: 2025-02-01
Changes:
- Minor compatibility updates
Date: 2025-03-03
Fixes:
- Fix Tier 1 module recipes to all require silicon, when wafers are not enabled.
- Space Age: When enabled, add a handcrafting recipe for silicon wafers
- Fix for infinite loop with certain mod loadouts (mostly during mod dev).
- Other minor fixes
---------------------------------------------------------------------------------------------------
Version: 2.0.6
Date: 2025-01-29

View file

@ -1,34 +0,0 @@
local util = require("data-util");
if mods["crafting-efficiency-2"] then
local eff_data = {
}
for i, recipe in pairs(util.me.recipes) do
-- add remaining recipes with direct items to find the icons
if data.raw.recipe[recipe] and data.raw.item[recipe] and not eff_data[recipe] then
local research_level = 1
if not data.raw.recipe[recipe].enabled then
for tech, tbl in pairs(data.raw.technology) do
for _, effect in pairs(tbl.effects or {}) do
if effect.type == "unlock-recipe" and effect.recipe == recipe then
research_level = math.min(#tbl.unit.ingredients, 6)
end
end
end
end
eff_data[recipe] = {
max = 15,
icon = data.raw.item[recipe].icon,
crafting = { efficiency = 10 },
research = { level = research_level },
}
end
end
for recipe, d in pairs(eff_data) do
log("Adding "..recipe.." crafting efficiency")
d.name = recipe:gsub("^%l", string.upper).." efficiency"
CE_Add_Recipe(d, recipe)
end
end

View file

@ -2,7 +2,6 @@ require("recipe-updates")
require("strange-matter")
require("recipes/silicon-vulcanite")
require("compatibility/248k")
require("compatibility/crafting-efficiency")
require("compatibility/any-planet-start")
local util = require("data-util");

View file

@ -12,6 +12,30 @@ util.get_setting = util.me.get_setting
util.titanium_plate = ""
util.titanium_processing = ""
local item_sounds_helper = [[
local item_sounds = require('__base__.prototypes.item_sounds')
inventory_move_sound = item_sounds.wire_inventory_move,
pick_sound = item_sounds.wire_inventory_pickup,
drop_sound = item_sounds.wire_inventory_move,
inventory_move_sound = item_sounds.metal_small_inventory_move,
pick_sound = item_sounds.metal_small_inventory_pickup,
drop_sound = item_sounds.metal_small_inventory_move,
inventory_move_sound = item_sounds.resource_inventory_move,
pick_sound = item_sounds.resource_inventory_pickup,
drop_sound = item_sounds.resource_inventory_move,
inventory_move_sound = item_sounds.brick_inventory_move,
pick_sound = item_sounds.brick_inventory_pickup,
drop_sound = item_sounds.brick_inventory_move,
inventory_move_sound = item_sounds.sulfur_inventory_move,
pick_sound = item_sounds.resource_inventory_pickup,
drop_sound = item_sounds.sulfur_inventory_move,
]]
util.A = {{"automation-science-pack", 1}}
util.AL = {{"automation-science-pack", 1}, {"logistic-science-pack", 1}}
util.ALC = {{"automation-science-pack", 1}, {"logistic-science-pack", 1}, {"chemical-science-pack", 1}}
@ -157,6 +181,7 @@ function util.add_shiftite_recipe(item, shiftites, quantity)
end
-- Add the gleba rock. If it exists, still add resource to mine from it
local gleba_tint = {.6, .8, 1}
function util.add_gleba_rock(resource, amount_min, amount_max)
if (not data.raw.planet.gleba or
not data.raw.planet.gleba.map_gen_settings or -- attempted compatibility fixes
@ -176,7 +201,7 @@ function util.add_gleba_rock(resource, amount_min, amount_max)
name = "gleba-rock",
localised_name = {"entity-name.big-rock"},
flags = {"placeable-neutral", "placeable-off-grid"},
icon = "__base__/graphics/icons/big-sand-rock.png",
icons = {{icon = "__base__/graphics/icons/big-sand-rock.png", tint=gleba_tint}},
subgroup = "grass",
order = "b[decorative]-l[rock]-a[big]",
deconstruction_alternative = "big-rock",
@ -227,6 +252,7 @@ function util.add_gleba_rock(resource, amount_min, amount_max)
{
{
filename = "__base__/graphics/decorative/sand-rock/big-sand-rock-01.png",
tint = gleba_tint,
width = 209,
height = 138,
shift = {0.304688, -0.4},
@ -234,6 +260,7 @@ function util.add_gleba_rock(resource, amount_min, amount_max)
},
{
filename = "__base__/graphics/decorative/sand-rock/big-sand-rock-02.png",
tint = gleba_tint,
width = 165,
height = 129,
shift = {0.0, 0.0390625},
@ -241,6 +268,7 @@ function util.add_gleba_rock(resource, amount_min, amount_max)
},
{
filename = "__base__/graphics/decorative/sand-rock/big-sand-rock-03.png",
tint = gleba_tint,
width = 151,
height = 139,
shift = {0.151562, 0.0},
@ -248,6 +276,7 @@ function util.add_gleba_rock(resource, amount_min, amount_max)
},
{
filename = "__base__/graphics/decorative/sand-rock/big-sand-rock-04.png",
tint = gleba_tint,
width = 216,
height = 110,
shift = {0.390625, 0.0},
@ -255,6 +284,7 @@ function util.add_gleba_rock(resource, amount_min, amount_max)
},
{
filename = "__base__/graphics/decorative/sand-rock/big-sand-rock-05.png",
tint = gleba_tint,
width = 154,
height = 147,
shift = {0.328125, 0.0703125},
@ -262,6 +292,7 @@ function util.add_gleba_rock(resource, amount_min, amount_max)
},
{
filename = "__base__/graphics/decorative/sand-rock/big-sand-rock-06.png",
tint = gleba_tint,
width = 154,
height = 132,
shift = {0.16875, -0.1},
@ -269,6 +300,7 @@ function util.add_gleba_rock(resource, amount_min, amount_max)
},
{
filename = "__base__/graphics/decorative/sand-rock/big-sand-rock-07.png",
tint = gleba_tint,
width = 193,
height = 130,
shift = {0.3, -0.2},
@ -276,6 +308,7 @@ function util.add_gleba_rock(resource, amount_min, amount_max)
},
{
filename = "__base__/graphics/decorative/sand-rock/big-sand-rock-08.png",
tint = gleba_tint,
width = 136,
height = 117,
shift = {0.0, 0.0},
@ -283,6 +316,7 @@ function util.add_gleba_rock(resource, amount_min, amount_max)
},
{
filename = "__base__/graphics/decorative/sand-rock/big-sand-rock-09.png",
tint = gleba_tint,
width = 157,
height = 115,
shift = {0.1, 0.0},
@ -290,6 +324,7 @@ function util.add_gleba_rock(resource, amount_min, amount_max)
},
{
filename = "__base__/graphics/decorative/sand-rock/big-sand-rock-10.png",
tint = gleba_tint,
width = 198,
height = 153,
shift = {0.325, -0.1},
@ -297,6 +332,7 @@ function util.add_gleba_rock(resource, amount_min, amount_max)
},
{
filename = "__base__/graphics/decorative/sand-rock/big-sand-rock-11.png",
tint = gleba_tint,
width = 190,
height = 115,
shift = {0.453125, 0.0},
@ -304,6 +340,7 @@ function util.add_gleba_rock(resource, amount_min, amount_max)
},
{
filename = "__base__/graphics/decorative/sand-rock/big-sand-rock-12.png",
tint = gleba_tint,
width = 229,
height = 126,
shift = {0.539062, -0.015625},
@ -311,6 +348,7 @@ function util.add_gleba_rock(resource, amount_min, amount_max)
},
{
filename = "__base__/graphics/decorative/sand-rock/big-sand-rock-13.png",
tint = gleba_tint,
width = 151,
height = 125,
shift = {0.0703125, 0.179688},
@ -318,6 +356,7 @@ function util.add_gleba_rock(resource, amount_min, amount_max)
},
{
filename = "__base__/graphics/decorative/sand-rock/big-sand-rock-14.png",
tint = gleba_tint,
width = 137,
height = 117,
shift = {0.160938, 0.0},
@ -325,6 +364,7 @@ function util.add_gleba_rock(resource, amount_min, amount_max)
},
{
filename = "__base__/graphics/decorative/sand-rock/big-sand-rock-15.png",
tint = gleba_tint,
width = 201,
height = 141,
shift = {0.242188, -0.195312},
@ -332,6 +372,7 @@ function util.add_gleba_rock(resource, amount_min, amount_max)
},
{
filename = "__base__/graphics/decorative/sand-rock/big-sand-rock-16.png",
tint = gleba_tint,
width = 209,
height = 154,
shift = {0.351562, -0.1},
@ -571,7 +612,7 @@ function util.se_matter(params)
{"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="fluid", name="se-space-coolant-hot", amount=25, ignored_by_stats=25, ignored_by_productivity=25},
}
}
})
@ -608,7 +649,7 @@ function util.se_matter(params)
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="fluid", name="se-particle-stream", amount=params.stream_out, ignored_by_stats=50, ignored_by_productivity=50},
}
}
})
@ -1187,8 +1228,11 @@ 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_stats then
result.ignored_by_stats = result.ignored_by_stats * multiple
end
if result.ignored_by_productivity then
result.ignored_by_productivity = result.ignored_by_productivity * multiple
end
end
end
@ -1483,6 +1527,12 @@ function util.set_to_founding(recipe, options)
util.set_subgroup(recipe, "foundry-intermediate", options)
end
function util.add_asteroid_to_planet(planet, spawn_def)
if data.raw.planet[planet] and data.raw[spawn_def.type][spawn_def.asteroid] then
table.insert(data.raw.planet[planet].asteroid_spawn_definitions, spawn_def)
end
end
-- Add crafting category to an entity
function util.add_crafting_category(entity_type, entity, category)
if data.raw[entity_type][entity] and data.raw["recipe-category"][category] then
@ -1663,12 +1713,17 @@ end
function util.remove_prior_unlocks(tech, recipe)
if data.raw.technology[tech].prerequisites then
for i, prerequisite in pairs(data.raw.technology[tech].prerequisites) do
remove_prior_unlocks(prerequisite, recipe)
remove_prior_unlocks(prerequisite, recipe, {})
end
end
end
function remove_prior_unlocks(tech, recipe)
function remove_prior_unlocks(tech, recipe, processed)
if processed[tech] then
print("Already processed ".. tech .. " returning")
return
end
processed[tech] = true
local technology = data.raw.technology[tech]
if technology then
log("Removing prior unlocks for ".. tech)
@ -1677,7 +1732,7 @@ function remove_prior_unlocks(tech, recipe)
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)
remove_prior_unlocks(prerequisite, recipe, processed)
end
end
end
@ -1701,12 +1756,17 @@ function util.replace_ingredients_prior_to(tech, old, new, multiplier)
end
if data.raw.technology[tech].prerequisites then
for i, prerequisite in pairs(data.raw.technology[tech].prerequisites) do
replace_ingredients_prior_to(prerequisite, old, new, multiplier)
replace_ingredients_prior_to(prerequisite, old, new, multiplier, {})
end
end
end
function replace_ingredients_prior_to(tech, old, new, multiplier)
function replace_ingredients_prior_to(tech, old, new, multiplier, processed)
if processed[tech] then
print("Already processed ".. tech .. " returning")
return
end
processed[tech] = true
log("Replacing for tech "..tech)
local technology = data.raw.technology[tech]
if technology then
@ -1722,7 +1782,7 @@ function replace_ingredients_prior_to(tech, old, new, multiplier)
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)
replace_ingredients_prior_to(prerequisite, old, new, multiplier, processed)
end
end
end
@ -1803,11 +1863,7 @@ end
-- Save recycling metadata that is later removed by quality mod. Call near end of data.lua
function util.prepare_recycling_helper()
if mods.quality then
for _, recipe in pairs(data.raw.recipe) do
recipe.auto_recycle_helper = recipe.auto_recycle
end
end
-- DEPRECATED
end
-- Recalculate recycling recipes, call near end of data-updates.lua, after calling
@ -1816,7 +1872,6 @@ function util.redo_recycling()
if mods.quality then
local recycling = require("__quality__.prototypes.recycling")
for _, recipe in pairs(data.raw.recipe) do
recipe.auto_recycle = recipe.auto_recycle_helper -- keeping this outside conditional to improve fidelity across multiple mods
if recipe.redo_recycling then
recycling.generate_recycling_recipe(recipe)
end

View file

@ -1,6 +1,6 @@
{
"name": "bzsilicon",
"version": "2.0.8",
"version": "2.0.11",
"factorio_version": "2.0",
"title": "Silica & Silicon",
"author": "Brevven",

View file

@ -8,7 +8,7 @@ razorgrass-plant=Razorgrass
basic-crusher=Basic crusher
[entity-description]
razorgrass-plant=A tall, sharp grass that only grows on the rare dry parts of Gleba. High in silica, it uses this advantage to help store water in its long leaves. If these leaveas are burned before drying, the upward pressure from the water vapor will carry the silica-rich ash away.
razorgrass-plant=A tall, sharp grass that only grows on the rare dry parts of Gleba. High in silica, it uses this advantage to help store water in its long leaves. If these leaves are burned before drying, the upward pressure from the water vapor will carry the silica-rich ash away.
[item-name]
silica=Silica

View file

@ -4,7 +4,7 @@ local item_sounds = require("__base__.prototypes.item_sounds")
local sounds = require("__base__.prototypes.entity.sounds")
local hit_effects = require("__base__.prototypes.entity.hit-effects")
if mods["space-age"] then
if mods["space-age"] and not data.raw.furnace["basic-crusher"] then
-- note that crusher is a space age asset and as such can only be used with space age
local graphics = require("__space-age__.prototypes.entity.crusher-pictures")
@ -20,10 +20,10 @@ graphics.animation.east.layers[1].scale = graphics.animation.east.layers[1].scal
graphics.animation.east.layers[2].scale = graphics.animation.east.layers[2].scale * 0.5
graphics.animation.west.layers[1].scale = graphics.animation.west.layers[1].scale * 0.5
graphics.animation.west.layers[2].scale = graphics.animation.west.layers[2].scale * 0.5
graphics.working_visualisations.layers.north_animation.scale = graphics.working_visualisations.layers.north_animation.scale * 0.5
graphics.working_visualisations.layers.east_animation.scale = graphics.working_visualisations.layers.east_animation.scale * 0.5
graphics.working_visualisations.layers.south_animation.scale = graphics.working_visualisations.layers.south_animation.scale * 0.5
graphics.working_visualisations.layers.west_animation.scale = graphics.working_visualisations.layers.west_animation.scale * 0.5
graphics.working_visualisations[1].north_animation.scale = graphics.working_visualisations[1].north_animation.scale * 0.5
graphics.working_visualisations[1].east_animation.scale = graphics.working_visualisations[1].east_animation.scale * 0.5
graphics.working_visualisations[1].south_animation.scale = graphics.working_visualisations[1].south_animation.scale * 0.5
graphics.working_visualisations[1].west_animation.scale = graphics.working_visualisations[1].west_animation.scale * 0.5
graphics.integration_patch.north.shift[1] = graphics.integration_patch.north.shift[1] * 0.5
graphics.integration_patch.north.shift[2] = graphics.integration_patch.north.shift[2] * 0.5
@ -49,15 +49,14 @@ graphics.animation.west.layers[1].shift[1] = graphics.animation.west.layers[1].s
graphics.animation.west.layers[1].shift[2] = graphics.animation.west.layers[1].shift[2] * 0.5
graphics.animation.west.layers[2].shift[1] = graphics.animation.west.layers[2].shift[1] * 0.5
graphics.animation.west.layers[2].shift[2] = graphics.animation.west.layers[2].shift[2] * 0.5
graphics.working_visualisations.layers.north_animation.shift[1] = graphics.working_visualisations.layers.north_animation.shift[1] * 0.5
graphics.working_visualisations.layers.north_animation.shift[2] = graphics.working_visualisations.layers.north_animation.shift[2] * 0.5
graphics.working_visualisations.layers.south_animation.shift[1] = graphics.working_visualisations.layers.south_animation.shift[1] * 0.5
graphics.working_visualisations.layers.south_animation.shift[2] = graphics.working_visualisations.layers.south_animation.shift[2] * 0.5
graphics.working_visualisations.layers.east_animation.shift[1] = graphics.working_visualisations.layers.east_animation.shift[1] * 0.5
graphics.working_visualisations.layers.east_animation.shift[2] = graphics.working_visualisations.layers.east_animation.shift[2] * 0.5
graphics.working_visualisations.layers.west_animation.shift[1] = graphics.working_visualisations.layers.west_animation.shift[1] * 0.5
graphics.working_visualisations.layers.west_animation.shift[2] = graphics.working_visualisations.layers.west_animation.shift[2] * 0.5
graphics.working_visualisations[1].north_animation.shift[1] = graphics.working_visualisations[1].north_animation.shift[1] * 0.5
graphics.working_visualisations[1].north_animation.shift[2] = graphics.working_visualisations[1].north_animation.shift[2] * 0.5
graphics.working_visualisations[1].south_animation.shift[1] = graphics.working_visualisations[1].south_animation.shift[1] * 0.5
graphics.working_visualisations[1].south_animation.shift[2] = graphics.working_visualisations[1].south_animation.shift[2] * 0.5
graphics.working_visualisations[1].east_animation.shift[1] = graphics.working_visualisations[1].east_animation.shift[1] * 0.5
graphics.working_visualisations[1].east_animation.shift[2] = graphics.working_visualisations[1].east_animation.shift[2] * 0.5
graphics.working_visualisations[1].west_animation.shift[1] = graphics.working_visualisations[1].west_animation.shift[1] * 0.5
graphics.working_visualisations[1].west_animation.shift[2] = graphics.working_visualisations[1].west_animation.shift[2] * 0.5
util.add_new_crafting_category("basic-crushing", true)
@ -180,3 +179,6 @@ else
end
util.add_prerequisite("silica-processing", "automation-2")
end
-- For graphite we can't have steel as an ingredient.
util.remove_ingredient("basic-crusher", "steel-plate")
util.add_to_ingredient("basic-crusher", "iron-plate", 20)

View file

@ -1,4 +1,5 @@
local util = require("data-util");
local item_sounds = require('__base__.prototypes.item_sounds')
if util.me.use_gyros() then
gyro_ingredients = { -- outputs 4
@ -28,6 +29,9 @@ data:extend({
name = "gyro",
icon = "__bzsilicon__/graphics/icons/gyro.png",
icon_size = 128,
inventory_move_sound = item_sounds.electric_small_inventory_move,
pick_sound = item_sounds.electric_small_inventory_pickup,
drop_sound = item_sounds.electric_small_inventory_move,
subgroup = util.se6() and "electronic" or "intermediate-product",
order = "s[silicon]-z-gyro",
stack_size = util.get_stack_size(200),

View file

@ -1,5 +1,6 @@
-- Optical Fiber
local util = require("__bzsilicon__.data-util");
local item_sounds = require('__base__.prototypes.item_sounds')
data:extend(
{
{
@ -7,6 +8,9 @@ data:extend(
name = "optical-fiber",
icon = "__bzsilicon__/graphics/icons/optical-fiber.png",
icon_size = 64, icon_mipmaps = 3,
inventory_move_sound = item_sounds.wire_inventory_move,
pick_sound = item_sounds.wire_inventory_pickup,
drop_sound = item_sounds.wire_inventory_move,
subgroup = util.cablesg,
order = "a[optical-fiber]",
stack_size = util.get_stack_size(200),

View file

@ -1,10 +1,11 @@
if mods["space-age"] then
local futil = require("util")
local util = require("data-util")
if mods["space-age"] then
data.raw.planet.gleba.map_gen_settings.autoplace_settings.entity.settings["razorgrass-plant"] = {}
local space_age_item_sounds = require("__space-age__.prototypes.item_sounds")
local item_sounds = require('__base__.prototypes.item_sounds')
data.raw.planet.gleba.map_gen_settings.autoplace_settings.entity.settings["razorgrass-plant"] = {}
local function razorgrass_variations()
local variation_count = 8 --variation_count or 5
local per_row = 4 -- per_row or 5
@ -243,6 +244,9 @@ data:extend({
{filename="__bzsilicon__/graphics/icons/razorgrass-2.png", size=128, scale=.3},
{filename="__bzsilicon__/graphics/icons/razorgrass-3.png", size=128, scale=.3},
},
inventory_move_sound = space_age_item_sounds.agriculture_inventory_move,
pick_sound = space_age_item_sounds.agriculture_inventory_pickup,
drop_sound = space_age_item_sounds.agriculture_inventory_move,
subgroup = "agriculture-processes",
group = "intermediate-products",
stack_size = 50,
@ -264,6 +268,9 @@ data:extend({
{filename="__bzsilicon__/graphics/icons/razorgrass-dried-2.png", size=128, scale=.3},
{filename="__bzsilicon__/graphics/icons/razorgrass-dried-3.png", size=128, scale=.3},
},
inventory_move_sound = space_age_item_sounds.agriculture_inventory_move,
pick_sound = space_age_item_sounds.agriculture_inventory_pickup,
drop_sound = space_age_item_sounds.agriculture_inventory_move,
subgroup = "agriculture-processes",
group = "intermediate-products",
stack_size = 100,
@ -278,6 +285,9 @@ data:extend({
name = "razorgrass-ash",
icon = "__bzsilicon__/graphics/icons/ash.png",
icon_size = 64,
inventory_move_sound = item_sounds.sulfur_inventory_move,
pick_sound = item_sounds.resource_inventory_pickup,
drop_sound = item_sounds.sulfur_inventory_move,
subgroup = "agriculture-processes",
group = "intermediate-products",
stack_size = 100,

View file

@ -1,5 +1,6 @@
-- Silica
local util = require("__bzsilicon__.data-util");
local item_sounds = require('__base__.prototypes.item_sounds')
data:extend(
{
mods["Krastorio2"] and {
@ -29,15 +30,15 @@ data:extend(
allow_productivity = true,
ingredients = {util.item("stone-crushed", 4)},
results = {util.item("silica", 5)},
} or mods["aai-industry"] and {
type = "recipe",
name = "silica",
category = mods["space-age"] and "basic-crushing" or "crafting",
enabled = false,
energy_required = 0.5,
allow_productivity = true,
ingredients = {util.item("sand", 1)},
results = {util.item("silica", 1)},
-- } or mods["aai-industry"] and {
-- type = "recipe",
-- name = "silica",
-- category = mods["space-age"] and "basic-crushing" or "crafting",
-- enabled = false,
-- energy_required = 0.5,
-- allow_productivity = true,
-- ingredients = {util.item("sand", 1)},
-- results = {util.item("silica", 1)},
} or
{
type = "recipe",
@ -62,6 +63,9 @@ data:extend(
name = "silica",
icon = "__bzsilicon__/graphics/icons/silica.png",
icon_size = 64, icon_mipmaps = 3,
inventory_move_sound = item_sounds.sulfur_inventory_move,
pick_sound = item_sounds.resource_inventory_pickup,
drop_sound = item_sounds.sulfur_inventory_move,
subgroup = "raw-material",
order = "b[silica]",
stack_size = util.get_stack_size(100),

View file

@ -1,5 +1,6 @@
-- Silicon
local util = require("data-util");
local item_sounds = require('__base__.prototypes.item_sounds')
if mods["Krastorio2"] then
util.remove_raw("recipe", "silicon-2")
util.remove_recipe_effect("kr-silicon-processing", "silicon-2")
@ -54,6 +55,9 @@ data:extend(
name = "silicon",
icon = "__bzsilicon__/graphics/icons/silicon.png",
icon_size = 64, icon_mipmaps = 3,
inventory_move_sound = item_sounds.sulfur_inventory_move,
pick_sound = item_sounds.resource_inventory_pickup,
drop_sound = item_sounds.sulfur_inventory_move,
subgroup = "raw-material",
order = "b[silicon]",
stack_size = util.get_stack_size(100),
@ -99,6 +103,9 @@ data:extend({
name = "silicon-wafer",
icon = "__bzsilicon__/graphics/icons/silicon-wafer.png",
icon_size = 64, icon_mipmaps = 3,
inventory_move_sound = item_sounds.electric_small_inventory_move,
pick_sound = item_sounds.electric_small_inventory_pickup,
drop_sound = item_sounds.electric_small_inventory_move,
subgroup = "intermediate-product",
stack_size = util.get_stack_size(100),
order = "s[silicon]-silicon-wafer",
@ -110,16 +117,16 @@ data:extend({
category = "crafting-with-fluid",
subgroup = "intermediate-product",
enabled = false,
energy_required = 20,
energy_required = 2,
allow_productivity = true,
ingredients = (mods["Krastorio2"] and {
{type= "item", name="silicon", amount=20},
{type= "fluid", name="hydrogen-chloride", amount=50},
{type= "item", name="silicon", amount=2},
{type= "fluid", name="hydrogen-chloride", amount=5},
} or {
{type= "item", name="silicon", amount=20},
{type= "fluid", name="sulfuric-acid", amount=50},
{type= "item", name="silicon", amount=2},
{type= "fluid", name="sulfuric-acid", amount=5},
}),
results = {util.item("silicon-wafer", 30)}
results = {util.item("silicon-wafer", 3)}
},
{
type = "item",
@ -153,6 +160,9 @@ data:extend({
name = "solar-cell",
icon = "__bzsilicon__/graphics/icons/solar-cell.png",
icon_size = 64, icon_mipmaps = 3,
inventory_move_sound = item_sounds.electric_small_inventory_move,
pick_sound = item_sounds.electric_small_inventory_pickup,
drop_sound = item_sounds.electric_small_inventory_move,
subgroup = "intermediate-product",
stack_size = util.get_stack_size(100),
order = "s[silicon]-solar-cell",

View file

@ -118,8 +118,10 @@ if not mods["Krastorio2"] then
util.replace_some_ingredient("processing-unit", "electronic-circuit", 10, "silicon", 6)
util.remove_ingredient("effectivity-module", "electronic-circuit")
util.add_ingredient("effectivity-module", "silicon", 3)
util.remove_ingredient("efficiency-module", "electronic-circuit")
util.add_ingredient("efficiency-module", "silicon", 3)
util.remove_ingredient("quality-module", "electronic-circuit")
util.add_ingredient("quality-module", "silicon", 3)
util.remove_ingredient("productivity-module", "electronic-circuit")
util.add_ingredient("productivity-module", "silicon", 3)
util.remove_ingredient("speed-module", "electronic-circuit")
@ -274,11 +276,16 @@ if mods["extended-research-system"] and mods["Bio_Industries"] then
end
end
-- Sand in crusher
-- Sand in crusher. If sand comes from stone, silica comes from sand
if mods["space-age"] then
if data.raw.item["sand"] and data.raw.recipe["sand"] and #data.raw.recipe["sand"].ingredients == 1 then
data.raw.recipe["sand"].category = "basic-crushing"
log(serpent.block(data.raw.recipe["sand"]))
log(serpent.block(data.raw.recipe.sand))
if data.raw.recipe.sand.ingredients[1].name == "stone" then
util.replace_ingredient("silica", "stone", "sand", 1)
util.set_product_amount("silica", "silica", 1)
util.set_recipe_time("silica", 0.5)
end
end
end