wood coke recipe

This commit is contained in:
Brevven 2023-03-05 23:14:36 -08:00
parent b23dfe0a95
commit a12ced6888
7 changed files with 67 additions and 3 deletions

View file

@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 0.2.10
Date: 2023-03-06
Features:
- For some mod loadouts, optional coke recipe to use up wood, default off.
---------------------------------------------------------------------------------------------------
Version: 0.2.9
Date: 2022-12-27
Fixes:

View file

@ -1,6 +1,6 @@
{
"name": "bzfoundry",
"version": "0.2.9",
"version": "0.2.10",
"factorio_version": "1.1",
"title": "Foundry",
"author": "Brevven",

View file

@ -39,6 +39,7 @@ bzfoundry-smelt=Foundry can smelt
bzfoundry-plates=Add refractory recipes (experimental)
bzfoundry-hydrocarbon=Hydrocarbon for founding
bzfoundry-other-machines=Other machines that can do founding
bzfoundry-woodcoke=Optional recipe for coke that usees wood
bzfoundry-minimal=Minimal mode (remove buildings)
[mod-setting-description]
@ -48,3 +49,4 @@ bzfoundry-hydrocarbon=Which hydrocarbon to use for founding. The foundry buildin
bzfoundry-other-machines=Comma-separated list of other "assembling-machine" entities that can do "founding" recipes. Eg. Krastorio2's "kr-advanced-furnace", AAII's "industrial-furnace", or Space Exploration's "se-space-thermodynamics-laboratory"
bzfoundry-plates=[color=orange]EXPERIMENTAL[/color] Ingredients, products, or anything might change.\nUsing one or more refractories, foundries can increase output of plates.\nBe warned, these are complex recipes.
bzfoundry-minimal=[color=yellow]Use with caution![/color]\nIntended as a workaround for Factorio's required mod dependency system. Disables foundry buildings and recipe changes that rely on them. Allows you to play without Foundry with Aluminum, while still letting Foundry be a required dependency with default mod settings.
bzfoundry-woodcoke=Also works with slid fuel as hydrocarbon, but not coal.

4
me.lua
View file

@ -6,6 +6,10 @@ function me.basic_founding()
return mods.bztin or mods.bzaluminum
end
function me.woodcoke()
return me.get_setting("bzfoundry-woodcoke")
end
function me.founding_plates()
return me.get_setting("bzfoundry-plates") == "yes"
end

View file

@ -31,6 +31,23 @@ data:extend({
enabled=false,
},
})
if util.me.woodcoke() then
data:extend({
{
type = "recipe",
name = "woodcoke",
result = "coke",
category = "founding",
ingredients = {{"coal", 1}, {"wood", 2}},
energy_required = 3.2,
enabled=false,
icons = {
{ icon = "__bzfoundry__/graphics/icons/coke-icon.png", icon_size = 128},
{ icon = "__base__/graphics/icons/wood.png", icon_size = 64, scale=0.25, shift={8,-8}},
},
},
})
end
elseif util.me.carbon() == "solid-fuel" then
data:extend({
{
@ -43,4 +60,21 @@ data:extend({
enabled=false,
},
})
if util.me.woodcoke() then
data:extend({
{
type = "recipe",
name = "woodcoke",
result = "solid-fuel",
category = "founding",
ingredients = {{"coal", 3}, {"wood", 2}},
energy_required = 3.2,
enabled=false,
icons = {
{ icon = "__base__/graphics/icons/solid-fuel.png", icon_size = 64, icon_mipmaps=4},
{ icon = "__base__/graphics/icons/wood.png", icon_size = 64, scale=0.25, shift={8,-8}, icon_mipmaps=4},
},
},
})
end
end

View file

@ -43,8 +43,10 @@ data:extend({
},
order = "foundry",
},
})
if util.me.woodcoke() then
util.add_unlock("foundry", "woodcoke")
end
if mods.Krastorio2 then
util.add_prerequisite("foundry", "kr-stone-processing")

View file

@ -5,6 +5,7 @@ data:extend({
setting_type = "startup",
default_value = "",
allow_blank = true,
order = "aaa",
},
{
type = "string-setting",
@ -12,18 +13,21 @@ data:extend({
setting_type = "startup",
allowed_values = {"coke", "solid-fuel", "coal", "none"},
default_value = "coke",
order = "aba",
},
{
type = "bool-setting",
name = "bzfoundry-smelt",
setting_type = "startup",
default_value = false,
order = "aca",
},
{
type = "string-setting",
name = "bzfoundry-other-machines",
setting_type = "startup",
default_value = "kr-advanced-furnace",
order = "acb",
},
{
type = "string-setting",
@ -31,12 +35,25 @@ data:extend({
setting_type = "startup",
default_value = "no",
allowed_values = {"yes", "no"},
order = "acd",
},
{
type = "bool-setting",
name = "bzfoundry-minimal",
setting_type = "startup",
default_value = false,
hidden = not mods.bzaluminum
hidden = not mods.bzaluminum,
order = "zza",
},
})
if not mods.Krastorio2 then
data:extend({
{
type = "bool-setting",
name = "bzfoundry-woodcoke",
setting_type = "startup",
default_value = false,
order = "abb",
},
})
end