diff --git a/changelog.txt b/changelog.txt index 3bbb90f..df360f6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 0.4.3 +Date: 2021-05-21 + Features: + - Add option for lead in sulfuric acid introduced on 0.4.0. To be removed in 2022 +--------------------------------------------------------------------------------------------------- Version: 0.4.2 Date: 2021-05-21 Features: diff --git a/info.json b/info.json index 9d6c74e..90b5c90 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bzlead", - "version": "0.4.2", + "version": "0.4.3", "factorio_version": "1.1", "title": "Lead", "author": "Brevven", diff --git a/lead-recipe-updates.lua b/lead-recipe-updates.lua index e0277f9..352f51f 100644 --- a/lead-recipe-updates.lua +++ b/lead-recipe-updates.lua @@ -7,7 +7,12 @@ if (not mods["pyrawores"] and not mods["bobplates"] and not mods["angelssmelting util.replace_ingredient("pipe-to-ground", "iron-plate", "lead-plate") util.replace_some_ingredient("storage-tank", "iron-plate", "lead-plate", 10) util.replace_ingredient("battery", "iron-plate", "lead-plate") - util.replace_ingredient("sulfuric-acid", "iron-plate", "lead-plate") + + + if util.sulfuric() then + util.replace_ingredient("sulfuric-acid", "iron-plate", "lead-plate") + end + util.replace_ingredient("uranium-fuel-cell", "iron-plate", "lead-plate") util.replace_some_ingredient("gun-turret", "iron-plate", "lead-plate", 5) diff --git a/locale/en/lead.cfg b/locale/en/lead.cfg index 4e26983..9ad0d33 100644 --- a/locale/en/lead.cfg +++ b/locale/en/lead.cfg @@ -40,7 +40,9 @@ dirty-water-filtration-lead=Filter dirty water, giving lead ore [item=lead-ore], # Settings [mod-setting-name] -bzlead-more-entities=Experimental: Lead entities +bzlead-more-entities=Lead entities +bzlead-sulfuric=Use lead in sulfuric acid. Default "yes". Use with care. [mod-setting-description] -bzlead-more-entities=Adds lead entities (currently just a lead chest). Currently "experimental", long-term support not guaranteed. +bzlead-more-entities=Adds lead entities (currently just a lead chest). +bzlead-sulfuric=Adds compatibility for old saves. Do NOT change to "no" for new saves. Will be removed (and always "yes") in 2022. diff --git a/settings.lua b/settings.lua index 9573acc..4d6faf5 100644 --- a/settings.lua +++ b/settings.lua @@ -7,4 +7,11 @@ data:extend( default_value = "no", allowed_values = {"yes", "no"}, }, + { -- TODO remove this in 2022 + type = "string-setting", + name = "bzlead-sulfuric", + setting_type = "startup", + default_value = "yes", + allowed_values = {"yes", "no"}, + }, }) diff --git a/util.lua b/util.lua index 9e05cbb..f1ce58b 100644 --- a/util.lua +++ b/util.lua @@ -14,6 +14,10 @@ function util.more_entities() return util.get_setting("bzlead-more-entities") == "yes" end +function util.sulfuric() + return util.get_setting("bzlead-sulfuric") == "yes" +end + function util.get_stack_size(default) if mods["Krastorio2"] then size = tonumber(krastorio.general.getSafeSettingValue("kr-stack-size"))