diff --git a/changelog.txt b/changelog.txt index 8499237..38e1eff 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,12 @@ --------------------------------------------------------------------------------------------------- +Version: 0.9.11 +Date: 2021-01-18 + Changes: + - SE/K2 - vulcanite smelting icon + - K2 stack sizes +--------------------------------------------------------------------------------------------------- Version: 0.9.10 -Date: 2021-01-09 +Date: 2021-01-16 Changes: - More very minor compatibility tweaks for py - Remove some logspam diff --git a/data-util.lua b/data-util.lua index b02f051..6aa0050 100644 --- a/data-util.lua +++ b/data-util.lua @@ -16,6 +16,11 @@ else end +function data_util.get_k2_stack_size() + return tonumber(krastorio.general.getSafeSettingValue("kr-stack-size")) +end + + -- Remove an element of type t and name from data.raw function data_util.remove_raw(t, name) for i, elem in pairs(data.raw[t]) do diff --git a/info.json b/info.json index c2dbfc9..b8bacc5 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bztitanium", - "version": "0.9.10", + "version": "0.9.11", "factorio_version": "1.1", "title": "Titanium", "author": "Brevven", diff --git a/titanium-enriched.lua b/titanium-enriched.lua index 9a2d767..a5735c8 100644 --- a/titanium-enriched.lua +++ b/titanium-enriched.lua @@ -17,7 +17,7 @@ data:extend( }, subgroup = "raw-material", order = "e05-a[enriched-ores]-a1[enriched-titanium]", - stack_size = 200 + stack_size = util.get_k2_stack_size(), }, { type = "recipe", diff --git a/titanium-ore.lua b/titanium-ore.lua index dc62322..fe08404 100644 --- a/titanium-ore.lua +++ b/titanium-ore.lua @@ -81,7 +81,7 @@ data:extend({ }, subgroup = "raw-resource", order = "t-c-a", - stack_size = (mods["Krastorio2"] and 200 or 50) + stack_size = (mods["Krastorio2"] and util.get_k2_stack_size() or 50) }, }) diff --git a/titanium-recipe.lua b/titanium-recipe.lua index 2d4f5b0..a119114 100644 --- a/titanium-recipe.lua +++ b/titanium-recipe.lua @@ -59,7 +59,7 @@ data:extend( icon_size = 64, subgroup = "raw-material", order = "b[titanium-plate]", - stack_size = (mods["Krastorio2"] and 200 or 100) + stack_size = (mods["Krastorio2"] and util.get_k2_stack_size() or 100) }, { type = "technology",