Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"? Krastorio2",
"? Krastorio2-spaced-out",
"? space-exploration",
"? 248k",
"? 248k-Redux",
"? aai-industry",
"? modmashsplinterelectronics",
"? bztitanium",
Expand Down
4 changes: 2 additions & 2 deletions me.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ end

function me.more_intermediates()
if me.get_setting("bz-all-intermediates") then return true end
return mods["Bio_Industries"] or me.get_setting("bzsilicon-more-intermediates") == "yes"
return mods["Bio_Industries_2"] or me.get_setting("bzsilicon-more-intermediates") == "yes"
end

function me.use_bio_crushed_stone()
return mods["Bio_Industries"] and me.get_setting("bzsilicon-bio-crushed-stone") == true
return mods["Bio_Industries_2"] and me.get_setting("bzsilicon-bio-crushed-stone") == true
end

function me.get_setting(name)
Expand Down
9 changes: 0 additions & 9 deletions prototypes/silica-recipe.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ 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
{
type = "recipe",
Expand Down
13 changes: 2 additions & 11 deletions prototypes/silicon-recipe.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if util.k2() then
util.remove_raw("recipe", "kr-silicon")
util.remove_recipe_effect("kr-silicon-processing", "kr-silicon")
if mods["Sebs-Electrics"] then
util.add_unlock("kr-silicon-processing", "silicon")
util.add_unlock("kr-silicon-processing", "kr-silicon")
end
end
local prerequisites = {}
Expand Down Expand Up @@ -40,15 +40,6 @@ data:extend(
allow_productivity = true,
ingredients = {util.item("silica", 10)},
results = {util.item("silicon", 1)}
-- expensive =
-- {
-- enabled = false,
-- energy_required = 3.2,
-- ingredients = {{"silica", 10}},
-- result = "silicon",
-- result_count = 1
-- },

},
(not util.k2()) and
{
Expand Down Expand Up @@ -209,7 +200,7 @@ if not mods["space-age"] then
end
end
util.add_effect("kr-fluids-chemistry", {type="unlock-recipe", recipe="kr-hydrogen-chloride"})
util.add_unlock("kr-silicon-processing", "silicon")
util.add_unlock("kr-silicon-processing", mods.Krastorio2 and "kr-silicon" or "silicon")


if util.me.more_intermediates() and not mods["space-age"] then
Expand Down
9 changes: 5 additions & 4 deletions recipe-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ if not util.k2() then
else
util.add_ingredient("concrete", "silica", 15);
if not mods["aai-industry"] then
util.add_ingredient("concrete", "sand", 10);
util.add_ingredient("concrete", "kr-sand", 10);
end
end

Expand Down Expand Up @@ -280,11 +280,12 @@ end

-- 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"
local sand = mods["Krastorio2"] and "kr-sand" or "sand"
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))
if data.raw.recipe.sand.ingredients[1].name == "stone" then
util.replace_ingredient("silica", "stone", "sand", 1)
util.replace_ingredient("silica", "stone", sand, 1)
util.set_product_amount("silica", "silica", 1)
util.set_recipe_time("silica", 0.5)
end
Expand Down
39 changes: 14 additions & 25 deletions recipes/silicon-vulcanite.lua
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
local util = require("data-util");

if mods["space-exploration"] then
if string.sub(mods["space-exploration"], 1, 3) == "0.6" and data.raw["item-subgroup"]["stone"] then
if data.raw["item-subgroup"]["stone"] then
util.set_item_subgroup("silica", "stone")
util.set_item_subgroup("silicon", "stone")
util.set_subgroup("silicon", "stone")
end
se_delivery_cannon_recipes["silica"] = {name= "silica"}
if mods["Krastorio2"] then
recipe = data.raw.recipe["silicon-vulcanite"]
local recipe = data.raw.recipe["se-kr-silicon-with-vulcanite"]
recipe.ingredients = {
{"silica", 18},
string.sub(mods["space-exploration"], 1, 3) == "0.6" and
{type="fluid", name="se-pyroflux", amount=10} or {"se-vulcanite-block", 1},
{type="item", name="silica", amount=18},
{type="fluid", name="se-pyroflux", amount=10},
}
recipe.category = "smelting" -- now uses pyroflux so can't be kiln in se 0.6
recipe.energy_required=21.6
recipe.results = {
{name = "silicon", amount = 6},
{type="item", name = "kr-silicon", amount = 6},
}
table.insert(recipe.ingredients, { type = "item", name = "kr-coke", amount = 1 })
recipe.icons = {
{ icon = "__Krastorio2Assets__/icons/items/silicon.png", icon_size = 64},
{ icon = "__space-exploration-graphics__/graphics/icons/fluid/pyroflux.png", icon_size = 64, scale=0.25, shift= {-10, -10}},
}
if string.sub(mods["space-exploration"], 1, 3) == "0.6" then
table.insert(recipe.ingredients, {"kr-coke", 1})
recipe.icons = {
{ icon = "__Krastorio2Assets__/icons/items-with-variations/silicon/silicon.png", icon_size = 64},
{ icon = "__space-exploration-graphics__/graphics/icons/fluid/pyroflux.png", icon_size = 64, scale=0.25, shift= {-10, -10}},
}
end
else
se_delivery_cannon_recipes["silicon"] = {name= "silicon"}
data:extend({
Expand All @@ -39,27 +36,19 @@ if mods["space-exploration"] then
always_show_made_in = true,
allow_as_intermediate = false,
ingredients = {
{name = "silica", amount = 20},
string.sub(mods["space-exploration"], 1, 3) == "0.6" and
{type="fluid", name="se-pyroflux", amount=10} or {"se-vulcanite-block", 1},
{type="item", name = "silica", amount = 20},
{type="fluid", name="se-pyroflux", amount=10},
},
results = {
{name = "silicon", amount = 3},
{type="item", name = "silicon", amount = 3},
},
icons = {
{ icon = "__bzsilicon__/graphics/icons/silicon.png", icon_size = 64, icon_mipmaps = 3 },
string.sub(mods["space-exploration"], 1, 3) == "0.6" and
{ icon = "__space-exploration-graphics__/graphics/icons/fluid/pyroflux.png", icon_size = 64, scale=0.25, shift= {-10, -10}} or
{ icon = "__space-exploration-graphics__/graphics/icons/vulcanite-block.png", icon_size = 64, scale=0.25, shift= {-10, -10}},
{ icon = "__space-exploration-graphics__/graphics/icons/fluid/pyroflux.png", icon_size = 64, scale=0.25, shift= {-10, -10}}
},
},
})
if string.sub(mods["space-exploration"], 1, 3) == "0.6" then
util.add_effect("se-vulcanite-smelting", {type = "unlock-recipe", recipe= "silicon-smelting-vulcanite"})
util.add_effect("se-pyroflux-smelting", {type = "unlock-recipe", recipe= "silicon-smelting-vulcanite"})
else
table.insert(data.raw.technology["se-processing-vulcanite"].effects,
{type = "unlock-recipe", recipe= "silicon-smelting-vulcanite"})
end
end
end