diff --git a/changelog.txt b/changelog.txt index c6be81b..d0e2aae 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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: diff --git a/info.json b/info.json index ee7be56..0764d9f 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bzfoundry", - "version": "0.2.9", + "version": "0.2.10", "factorio_version": "1.1", "title": "Foundry", "author": "Brevven", diff --git a/locale/en/foundry.cfg b/locale/en/foundry.cfg index f2dbdac..68cf5a6 100644 --- a/locale/en/foundry.cfg +++ b/locale/en/foundry.cfg @@ -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. diff --git a/me.lua b/me.lua index e4be5aa..bb06f1c 100644 --- a/me.lua +++ b/me.lua @@ -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 diff --git a/prototypes/coke.lua b/prototypes/coke.lua index f712f09..fad2cfa 100644 --- a/prototypes/coke.lua +++ b/prototypes/coke.lua @@ -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 diff --git a/prototypes/foundry.lua b/prototypes/foundry.lua index df68976..a5d3c06 100644 --- a/prototypes/foundry.lua +++ b/prototypes/foundry.lua @@ -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") diff --git a/settings.lua b/settings.lua index 8ba6427..ac02318 100644 --- a/settings.lua +++ b/settings.lua @@ -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