option to use refractories

This commit is contained in:
Brevven 2022-01-01 02:44:23 -08:00
parent 896d267cc4
commit 2890e6b844
8 changed files with 66 additions and 4 deletions

View file

@ -1,8 +1,11 @@
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
Version: 0.0.6 Version: 0.0.6
Date: 2021-12-30 Date: 2022-01-01
Changes: Features:
- Graphite compatibility - crucible - Graphite compatibility - crucible
- New option to enable more efficient founding of plates using refractory materials
Fixes:
- Steel time adjustment fix
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
Version: 0.0.5 Version: 0.0.5
Date: 2021-08-20 Date: 2021-08-20

View file

@ -1 +1,2 @@
require("foundry-updates") require("foundry-updates")
require("refractory-updates")

View file

@ -8,6 +8,15 @@ local util = {}
util.me = me util.me = me
util.get_setting = util.me.get_setting util.get_setting = util.me.get_setting
util.titanium_plate = ""
util.titanium_processing = ""
if mods["FactorioExtended-Plus-Core"] then
util.titanium_plate = "titanium-alloy"
else
util.titanium_plate = "titanium-plate"
end
function util.fe_plus(sub) function util.fe_plus(sub)
if mods["FactorioExtended-Plus-"..sub] then if mods["FactorioExtended-Plus-"..sub] then
return true return true
@ -435,4 +444,10 @@ function add_to_product(recipe, product, amount)
end end
end end
function util.add_minable_result(t, name, result)
if data.raw[t] and data.raw[t][name] and data.raw[t][name].minable and data.raw[t][name].minable.results then
table.insert(data.raw[t][name].minable.results, result)
end
end
return util return util

View file

@ -1,6 +1,6 @@
{ {
"name": "bzfoundry", "name": "bzfoundry",
"version": "0.0.5", "version": "0.0.6",
"factorio_version": "1.1", "factorio_version": "1.1",
"title": "Foundry", "title": "Foundry",
"author": "Brevven", "author": "Brevven",
@ -11,6 +11,7 @@
"? bzsilicon", "? bzsilicon",
"? bztungsten", "? bztungsten",
"? bzzirconium", "? bzzirconium",
"rusty-locale",
"base >= 1.1.0" "base >= 1.1.0"
], ],
"description": "Adds a foundry building for making alloys, etc." "description": "Adds a foundry building for making alloys, etc."

View file

@ -13,7 +13,8 @@ electric-foundry=For melting and casting metals, can also heat up other things.
coke=A pure fuel and source of carbon. coke=A pure fuel and source of carbon.
[recipe-name] [recipe-name]
solid-fuel-from-coal=Solid fuel from coal. solid-fuel-from-coal=Solid fuel from coal
with-refractory=__1__ with refractory
[recipe-description] [recipe-description]
solid-fuel-from-coal=Make solid fuel from coal, a wasteful process. solid-fuel-from-coal=Make solid fuel from coal, a wasteful process.
@ -21,13 +22,16 @@ solid-fuel-from-coal=Make solid fuel from coal, a wasteful process.
[technology-name] [technology-name]
foundry=__ITEM__foundry__ foundry=__ITEM__foundry__
electric-foundry=__ITEM__electric-foundry__ electric-foundry=__ITEM__electric-foundry__
advanced-founding=Advanced founding
[technology-description] [technology-description]
foundry=Use heat for founding, coking, etc. foundry=Use heat for founding, coking, etc.
advanced-founding=Alternate, efficient recipes for founding
[mod-setting-name] [mod-setting-name]
bzfoundry-recipe-bypass=Bypass recipes bzfoundry-recipe-bypass=Bypass recipes
bzfoundry-smelt=Foundry can smelt bzfoundry-smelt=Foundry can smelt
bzfoundry-plates=Add refractory recipes (experimental)
bzfoundry-hydrocarbon=Hydrocarbon for founding bzfoundry-hydrocarbon=Hydrocarbon for founding
bzfoundry-other-machines=Other machines that can do founding bzfoundry-other-machines=Other machines that can do founding
@ -36,3 +40,4 @@ bzfoundry-recipe-bypass=Skip modifying these recipes (comma-separated list).
bzfoundry-smelt=If true, the foundry building can also handle raw ore smelting. bzfoundry-smelt=If true, the foundry building can also handle raw ore smelting.
bzfoundry-hydrocarbon=Which hydrocarbon to use for founding. The foundry building is also used for coking.\nIf [color=cyan]coke[/color], a coke item and recipe is added, if needed.\nIf [color=cyan]solid fuel[/color], an early but inefficient recipe is added.\nIf [color=cyan]coal[/color], that is used.\nIf [color=cyan]none[/color], no hydrocarbon is used in founding (not recommended). bzfoundry-hydrocarbon=Which hydrocarbon to use for founding. The foundry building is also used for coking.\nIf [color=cyan]coke[/color], a coke item and recipe is added, if needed.\nIf [color=cyan]solid fuel[/color], an early but inefficient recipe is added.\nIf [color=cyan]coal[/color], that is used.\nIf [color=cyan]none[/color], no hydrocarbon is used in founding (not recommended).
bzfoundry-other-machines=List of other "assembling-machine" entities that can do "founding" recipes. Eg. Krastorio2's "kr-advanced-furnace", or AAII's "industrial-furnace" (comma-separated list). bzfoundry-other-machines=List of other "assembling-machine" entities that can do "founding" recipes. Eg. Krastorio2's "kr-advanced-furnace", or AAII's "industrial-furnace" (comma-separated list).
bzfoundry-plates=[color=orange]EXPERIMENTAL[/color] Ingredients, products, or anything might change.\nRequires "Silica & Silicon", "Zirconium", or "Graphite & Diamonds" mod.\nUsing one or more refractories, Foundries can increase output of plates.\nBe warned, these are complex recipes.

4
me.lua
View file

@ -2,6 +2,10 @@ local me = {}
me.name = "bzfoundry" me.name = "bzfoundry"
function me.founding_plates()
return me.get_setting("bzfoundry-plates")
end
function me.smelt() function me.smelt()
return me.get_setting("bzfoundry-smelt") return me.get_setting("bzfoundry-smelt")
end end

View file

@ -50,6 +50,7 @@ data:extend({
}, },
}) })
if mods.Krastorio2 then if mods.Krastorio2 then
util.add_prerequisite("foundry", "kr-stone-processing") util.add_prerequisite("foundry", "kr-stone-processing")
elseif mods["aai-industry"] then elseif mods["aai-industry"] then
@ -110,3 +111,28 @@ data:extend({
}, },
}) })
if mods.bzcarbon and util.me.founding_plates() then
data:extend({
{
type = "technology",
name = "advanced-founding",
icons = {
{icon = "__bzfoundry__/graphics/icons/technology/foundry.png", icon_size = 256},
{icon = "__bzcarbon__/graphics/icons/graphite.png", icon_size = 128, shift={-32, -32}},
},
effects = {},
prerequisites = {"electric-foundry", "utility-science-pack"},
unit = {
count = 1000,
ingredients = {{"automation-science-pack", 1},
{"logistic-science-pack", 1},
{"chemical-science-pack", 1},
{"production-science-pack", 1},
{"utility-science-pack", 1}},
time = 60,
},
order = "foundry",
}
})
end

View file

@ -25,4 +25,11 @@ data:extend({
setting_type = "startup", setting_type = "startup",
default_value = "kr-advanced-furnace", default_value = "kr-advanced-furnace",
}, },
{
type = "string-setting",
name = "bzfoundry-plates",
setting_type = "startup",
default_value = "no",
allowed_values = {"yes", "no"},
},
}) })