From 68962085cf444d0628c8c0d4a942c30e5ab151d1 Mon Sep 17 00:00:00 2001 From: Brevven Date: Sat, 6 Mar 2021 22:24:24 -0800 Subject: [PATCH 1/3] k2 stack size fix --- changelog.txt | 5 +++++ data-util.lua | 9 +++++++-- info.json | 2 +- titanium-enriched.lua | 2 +- titanium-ore.lua | 3 ++- titanium-recipe-se.lua | 1 - titanium-recipe.lua | 2 +- 7 files changed, 17 insertions(+), 7 deletions(-) diff --git a/changelog.txt b/changelog.txt index a049ef5..6d88437 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 0.9.15 +Date: 2021-01-29 + Fixes: + - K2 stack size fix for no changes +--------------------------------------------------------------------------------------------------- Version: 0.9.14 Date: 2021-01-25 Changes: diff --git a/data-util.lua b/data-util.lua index 6aa0050..405551a 100644 --- a/data-util.lua +++ b/data-util.lua @@ -16,11 +16,16 @@ else end -function data_util.get_k2_stack_size() - return tonumber(krastorio.general.getSafeSettingValue("kr-stack-size")) +function data_util.get_stack_size(default) + if mods["Krastorio2"] then + size = tonumber(krastorio.general.getSafeSettingValue("kr-stack-size")) + return size or default + end + return default 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 057db8a..c81aff6 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bztitanium", - "version": "0.9.14", + "version": "0.9.15", "factorio_version": "1.1", "title": "Titanium", "author": "Brevven", diff --git a/titanium-enriched.lua b/titanium-enriched.lua index 8a5437b..8b93cb5 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 = util.get_k2_stack_size(), + stack_size = util.get_stack_size(100), }, { type = "recipe", diff --git a/titanium-ore.lua b/titanium-ore.lua index fe08404..f8ddb8e 100644 --- a/titanium-ore.lua +++ b/titanium-ore.lua @@ -81,7 +81,8 @@ data:extend({ }, subgroup = "raw-resource", order = "t-c-a", - stack_size = (mods["Krastorio2"] and util.get_k2_stack_size() or 50) + stack_size = util.get_stack_size(50) }, }) +end diff --git a/titanium-recipe-se.lua b/titanium-recipe-se.lua index b4dfeb3..5a58575 100644 --- a/titanium-recipe-se.lua +++ b/titanium-recipe-se.lua @@ -27,7 +27,6 @@ if mods["space-exploration"] then { icon = "__bztitanium__/graphics/icons/titanium-plate.png", icon_size = 64 }, { icon = "__space-exploration-graphics__/graphics/icons/vulcanite-block.png", icon_size = 64, scale=0.25, shift= {-10, -10}}, }, - }, }) table.insert(data.raw.technology["se-processing-vulcanite"].effects, diff --git a/titanium-recipe.lua b/titanium-recipe.lua index a119114..9d8d4b3 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 util.get_k2_stack_size() or 100) + stack_size = util.get_stack_size(100) }, { type = "technology", From 6fbd0e5a2b299b93ebee96a9be5f9621c79e13dd Mon Sep 17 00:00:00 2001 From: Brevven Date: Sat, 6 Mar 2021 22:24:39 -0800 Subject: [PATCH 2/3] tiny py compatibility tweak --- changelog.txt | 5 +++++ info.json | 2 +- titanium-ore.lua | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 6d88437..755f1d3 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 0.9.16 +Date: 2021-02-12 + Fixes: + - Another tiny py compatibility tweak. +--------------------------------------------------------------------------------------------------- Version: 0.9.15 Date: 2021-01-29 Fixes: diff --git a/info.json b/info.json index c81aff6..7df4aa8 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bztitanium", - "version": "0.9.15", + "version": "0.9.16", "factorio_version": "1.1", "title": "Titanium", "author": "Brevven", diff --git a/titanium-ore.lua b/titanium-ore.lua index f8ddb8e..d7bad6a 100644 --- a/titanium-ore.lua +++ b/titanium-ore.lua @@ -6,6 +6,7 @@ if mods["FactorioExtended-Plus-Core"] then util.remove_raw("item", "titanium-ore") end +if (not mods["pyrawores"]) then data:extend({ { type = "autoplace-control", From f952c4b7725ffdae4a45173ac6e9f55e5524995a Mon Sep 17 00:00:00 2001 From: Brevven Date: Sat, 6 Mar 2021 23:23:44 -0800 Subject: [PATCH 3/3] the big furnace compatibility --- changelog.txt | 5 +++++ info.json | 2 +- titanium-recipe.lua | 28 +++++++++++++++++++++++++++- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 755f1d3..420a900 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 0.9.17 +Date: 2021-03-06 + Features: + - The Big Furnace recipe +--------------------------------------------------------------------------------------------------- Version: 0.9.16 Date: 2021-02-12 Fixes: diff --git a/info.json b/info.json index 7df4aa8..e616096 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bztitanium", - "version": "0.9.16", + "version": "0.9.17", "factorio_version": "1.1", "title": "Titanium", "author": "Brevven", diff --git a/titanium-recipe.lua b/titanium-recipe.lua index 9d8d4b3..064780b 100644 --- a/titanium-recipe.lua +++ b/titanium-recipe.lua @@ -71,7 +71,11 @@ data:extend( { type = "unlock-recipe", recipe = util.titanium_plate - } + }, + mods["TheBigFurnace"] and { + type = "unlock-recipe", + recipe = "big-titanium-plate", + } or nil, }, unit = { @@ -91,6 +95,28 @@ data:extend( prerequisites = {"lubricant"}, order = "b-b" }, + mods["TheBigFurnace"] and { + type = "recipe", + name = "big-titanium-plate", + category = "big-smelting", + order = "d[titanium-plate]", + normal = + { + enabled = false, + energy_required = 8.75, + ingredients = {{"titanium-ore", 50}}, + result = util.titanium_plate, + result_count = 10, + }, + expensive = + { + enabled = false, + energy_required = 16, + ingredients = {{"titanium-ore", 100}}, + result = util.titanium_plate, + result_count = 10, + } + } or nil, } ) end