byproduct setting, tech tweaks
This commit is contained in:
parent
8a5c65fe27
commit
f71f7db31c
9 changed files with 38 additions and 9 deletions
|
|
@ -99,7 +99,7 @@ data:extend(
|
||||||
results =
|
results =
|
||||||
{
|
{
|
||||||
{type = "fluid", name = "water", amount = 90, catalyst_amount = 90},
|
{type = "fluid", name = "water", amount = 90, catalyst_amount = 90},
|
||||||
mods.bzsilicon and {type = "item", name = "silica", amount = 1} or
|
mods.bzsilicon and util.me.byproduct() and {type = "item", name = "silica", amount = 1} or
|
||||||
{type = "item", name = "stone", probability = 0.40, amount = 1},
|
{type = "item", name = "stone", probability = 0.40, amount = 1},
|
||||||
{type = "item", name = "aluminum-ore", probability = 0.10, amount = 1},
|
{type = "item", name = "aluminum-ore", probability = 0.10, amount = 1},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,8 @@ if string.sub(mods["space-exploration"], 1, 3) == "0.6" then
|
||||||
order = "a-h-z-a",
|
order = "a-h-z-a",
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
data.raw.item["alumina"].subgroup = "aluminum"
|
util.set_item_subgroup("alumina", "aluminum")
|
||||||
data.raw.item["aluminum-plate"].subgroup = "aluminum"
|
util.set_item_subgroup("aluminum-plate", "aluminum")
|
||||||
data:extend({
|
data:extend({
|
||||||
{
|
{
|
||||||
type = "item",
|
type = "item",
|
||||||
|
|
@ -115,8 +115,10 @@ if string.sub(mods["space-exploration"], 1, 3) == "0.6" then
|
||||||
util.add_effect("se-vulcanite-smelting", {type = "unlock-recipe", recipe= "aluminum-ingot-to-plate"})
|
util.add_effect("se-vulcanite-smelting", {type = "unlock-recipe", recipe= "aluminum-ingot-to-plate"})
|
||||||
if mods["Krastorio2"] then
|
if mods["Krastorio2"] then
|
||||||
se_delivery_cannon_recipes["enriched-aluminum"] = {name= "enriched-aluminum"}
|
se_delivery_cannon_recipes["enriched-aluminum"] = {name= "enriched-aluminum"}
|
||||||
|
util.set_item_subgroup("enriched-aluminum", "aluminum")
|
||||||
|
else
|
||||||
|
if util.me.byproduct() then util.add_product("molten-aluminum", {"silica", 6}) end
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
-- Organization
|
-- Organization
|
||||||
data.raw.item["aluminum-plate"].subgroup = "plates"
|
data.raw.item["aluminum-plate"].subgroup = "plates"
|
||||||
|
|
@ -186,8 +188,7 @@ else
|
||||||
{name = "se-vulcanite-block", amount = 1},
|
{name = "se-vulcanite-block", amount = 1},
|
||||||
},
|
},
|
||||||
results = {
|
results = {
|
||||||
{name = "alumina", amount = 10},
|
{name = "alumina", amount = util.me.byproduct() and 10 or 12},
|
||||||
{name = "silica", amount = 2},
|
|
||||||
},
|
},
|
||||||
icons =
|
icons =
|
||||||
{
|
{
|
||||||
|
|
@ -198,6 +199,7 @@ else
|
||||||
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
if util.me.byproduct() then util.add_product("alumina-smelting-vulcanite", {"silica", 2}) end
|
||||||
table.insert(data.raw.technology["se-processing-vulcanite"].effects,
|
table.insert(data.raw.technology["se-processing-vulcanite"].effects,
|
||||||
{type = "unlock-recipe", recipe= "alumina-smelting-vulcanite"})
|
{type = "unlock-recipe", recipe= "alumina-smelting-vulcanite"})
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,12 @@ local futil = require("util");
|
||||||
|
|
||||||
local alumina_results = {}
|
local alumina_results = {}
|
||||||
|
|
||||||
if mods.bzsilicon and not mods.Krastorio2 then
|
if mods.bzsilicon and util.me.byproduct() and not mods.Krastorio2 then
|
||||||
alumina_results ={
|
alumina_results ={
|
||||||
{type="item", name = "alumina", amount=1, probability=0.95},
|
{type="item", name = "alumina", amount=1, probability=0.95},
|
||||||
{type="item", name = "silica", amount=1, probability=0.05},
|
{type="item", name = "silica", amount=1, probability=0.05},
|
||||||
}
|
}
|
||||||
elseif mods.bzsilicon and mods.Krastorio2 then
|
elseif mods.bzsilicon and util.me.byproduct() and mods.Krastorio2 then
|
||||||
alumina_results ={
|
alumina_results ={
|
||||||
{type="item", name = "alumina", amount=5, probability=0.95},
|
{type="item", name = "alumina", amount=5, probability=0.95},
|
||||||
{type="item", name = "silica", amount=1, probability=0.25},
|
{type="item", name = "silica", amount=1, probability=0.25},
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,11 @@
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 0.3.1
|
||||||
|
Date: 2022-07-01
|
||||||
|
Changes:
|
||||||
|
- Minor SE tweaks including pyroflux tech change.
|
||||||
|
Features:
|
||||||
|
- Add option to turn off byproduct. (This setting will show up in other resource mods soon).
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 0.3.0
|
Version: 0.3.0
|
||||||
Date: 2022-07-01
|
Date: 2022-07-01
|
||||||
Changes:
|
Changes:
|
||||||
|
|
|
||||||
|
|
@ -566,6 +566,14 @@ function util.set_subgroup(recipe_name, subgroup)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Set item subgroup
|
||||||
|
function util.set_item_subgroup(item, subgroup)
|
||||||
|
if me.bypass[item] then return end
|
||||||
|
if data.raw.item[item] and data.raw["item-subgroup"][subgroup] then
|
||||||
|
data.raw.item[item].subgroup = subgroup
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Set recipe icons
|
-- Set recipe icons
|
||||||
function util.set_icons(recipe_name, icons)
|
function util.set_icons(recipe_name, icons)
|
||||||
if me.bypass[recipe_name] then return end
|
if me.bypass[recipe_name] then return end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bzaluminum",
|
"name": "bzaluminum",
|
||||||
"version": "0.3.0",
|
"version": "0.3.1",
|
||||||
"factorio_version": "1.1",
|
"factorio_version": "1.1",
|
||||||
"title": "Aluminum",
|
"title": "Aluminum",
|
||||||
"author": "Brevven",
|
"author": "Brevven",
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,9 @@ dirty-water-filtration-aluminum=Filter dirty water, giving __ITEM__aluminum_lowe
|
||||||
[mod-setting-name]
|
[mod-setting-name]
|
||||||
bzaluminum-recipe-bypass=Bypass recipes
|
bzaluminum-recipe-bypass=Bypass recipes
|
||||||
bzaluminum-list=Make a list of modified recipes
|
bzaluminum-list=Make a list of modified recipes
|
||||||
|
bzaluminum-byproduct=Output byproducts
|
||||||
|
|
||||||
[mod-setting-description]
|
[mod-setting-description]
|
||||||
bzaluminum-recipe-bypass=Skip modifying these recipes (comma-separated list).
|
bzaluminum-recipe-bypass=Skip modifying these recipes (comma-separated list).
|
||||||
bzaluminum-list=If enabled, the text command [color=orange]BZList[/color] will dump a file to the script-output directory with a full list of recipes modified.\nRecommended to turn this off after you are done configuring your other settings.
|
bzaluminum-list=If enabled, the text command [color=orange]BZList[/color] will dump a file to the script-output directory with a full list of recipes modified.\nRecommended to turn this off after you are done configuring your other settings.
|
||||||
|
bzaluminum-byproduct=If enabled, and if silica is used, __ITEM__aluminum_lower__ production will output silica as a byproduct.
|
||||||
|
|
|
||||||
4
me.lua
4
me.lua
|
|
@ -7,6 +7,10 @@ function me.mod_setting()
|
||||||
return me.get_setting("bzmod-setting") == "yes"
|
return me.get_setting("bzmod-setting") == "yes"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function me.byproduct()
|
||||||
|
return me.get_setting("bzaluminum-byproduct")
|
||||||
|
end
|
||||||
|
|
||||||
function me.get_setting(name)
|
function me.get_setting(name)
|
||||||
if settings.startup[name] == nil then
|
if settings.startup[name] == nil then
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,12 @@ data:extend({
|
||||||
default_value = "",
|
default_value = "",
|
||||||
allow_blank = true,
|
allow_blank = true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type = "bool-setting",
|
||||||
|
name = "bzaluminum-byproduct",
|
||||||
|
setting_type = "startup",
|
||||||
|
default_value = true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type = "bool-setting",
|
type = "bool-setting",
|
||||||
name = "bzaluminum-list",
|
name = "bzaluminum-list",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue