From 94ad1f8af9c987157a68cff563c1f75b34b9c5c1 Mon Sep 17 00:00:00 2001 From: Brevven Date: Tue, 1 Feb 2022 21:18:53 -0800 Subject: [PATCH] stone sorting setting --- changelog.txt | 7 +++++++ locale/en/zirconium.cfg | 2 ++ me.lua | 4 ++++ settings.lua | 6 ++++++ zirconium-recipe.lua | 2 ++ 5 files changed, 21 insertions(+) diff --git a/changelog.txt b/changelog.txt index a040d9c..1171ec5 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,11 @@ --------------------------------------------------------------------------------------------------- +Version: 0.5.5 +Date: 2021-02-02 + Changes: + - Zircon/stone sorting is now behind a setting, default off. It is no longer necessary for + original balance purposes. If you use these recipes, update your mod startup settings before + saving your game. +--------------------------------------------------------------------------------------------------- Version: 0.5.4 Date: 2021-01-31 Fixes: diff --git a/locale/en/zirconium.cfg b/locale/en/zirconium.cfg index 468037c..a0a529c 100644 --- a/locale/en/zirconium.cfg +++ b/locale/en/zirconium.cfg @@ -54,9 +54,11 @@ dirty-water-filtration-zircon=Filter dirty water, giving zircon [item=zircon] an [mod-setting-name] bzzirconium-recipe-bypass=Bypass recipes bzzirconium-enable-intermediates=Enable cermet +bzzirconium-enable-sorting=Enable stone sorting [mod-setting-description] bzzirconium-recipe-bypass=Skip modifying these recipes (comma-separated list). bzzirconium-enable-intermediates=Enable cermet, an advanced intermediate made from ceramics and metals. +bzzirconium-enable-sorting=Enable "sorting" recipes to convert between zircon and stone. This is no longer as useful for burner phase as it used to be, but left as an option for certain map layouts or existing factories. [string-mod-setting] bzzirconium-enable-intermediates-lds=Yes, and __ITEM__cermet__ in __ITEM__low-density-structure__ bzzirconium-enable-intermediates-yes=Yes, but not in __ITEM__low-density-structure__ diff --git a/me.lua b/me.lua index 03b4050..2b4a0e9 100644 --- a/me.lua +++ b/me.lua @@ -10,6 +10,10 @@ function me.cermet_lds() return me.get_setting("bzzirconium-enable-intermediates") == "lds" end +function me.enable_sorting() + return me.get_setting("bzzirconium-enable-sorting") +end + function me.get_setting(name) if settings.startup[name] == nil then return nil diff --git a/settings.lua b/settings.lua index 624812e..322264c 100644 --- a/settings.lua +++ b/settings.lua @@ -13,4 +13,10 @@ data:extend({ default_value = "lds", allowed_values = {"lds", "yes", "no"}, }, + { + type = "bool-setting", + name = "bzzirconium-enable-sorting", + setting_type = "startup", + default_value = false, + }, }) diff --git a/zirconium-recipe.lua b/zirconium-recipe.lua index 2dc0507..3b56989 100644 --- a/zirconium-recipe.lua +++ b/zirconium-recipe.lua @@ -220,6 +220,7 @@ end end -- sorting +if util.me.enable_sorting() then data:extend({ { type = "recipe", @@ -258,6 +259,7 @@ data:extend({ } } }) +end -- Zirconium Tungstate, only if needed if mods.bztungsten and (mods["Krastorio2"] or mods["space-exploration"]) then