diff --git a/changelog.txt b/changelog.txt index 2d5825d..53658fe 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 0.0.3 +Date: 2022-07-06 + Features: + - Optional bronze plate item added, defaults to not enabled. +--------------------------------------------------------------------------------------------------- Version: 0.0.2 Date: 2022-07-06 Features: diff --git a/graphics/icons/bronze-plate.png b/graphics/icons/bronze-plate.png new file mode 100644 index 0000000..7682671 Binary files /dev/null and b/graphics/icons/bronze-plate.png differ diff --git a/graphics/icons/bronze-plate.xcf b/graphics/icons/bronze-plate.xcf new file mode 100644 index 0000000..65bac0c Binary files /dev/null and b/graphics/icons/bronze-plate.xcf differ diff --git a/graphics/icons/stacked/bronze-plate-stacked.png b/graphics/icons/stacked/bronze-plate-stacked.png new file mode 100644 index 0000000..6413bf1 Binary files /dev/null and b/graphics/icons/stacked/bronze-plate-stacked.png differ diff --git a/graphics/icons/stacked/bronze-plate-stacked.xcf b/graphics/icons/stacked/bronze-plate-stacked.xcf new file mode 100644 index 0000000..a2b970f Binary files /dev/null and b/graphics/icons/stacked/bronze-plate-stacked.xcf differ diff --git a/info.json b/info.json index 0264305..112db93 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bztin", - "version": "0.0.2", + "version": "0.0.3", "factorio_version": "1.1", "title": "Tin", "author": "Brevven", diff --git a/locale/en/tin.cfg b/locale/en/tin.cfg index eff2ccf..a0a8b32 100644 --- a/locale/en/tin.cfg +++ b/locale/en/tin.cfg @@ -13,6 +13,7 @@ solder=Solder tinned-cable=Tinned cable enriched-tin=Enriched tin compressed-tin-ore=Compressed tin ore +bronze-plate=Bronze plate [item-description] tin-ore=Can be smelted into tin plates @@ -59,4 +60,5 @@ bztin-list=If enabled, the text command [color=orange]BZList[/color] will dump a [string-mod-setting] bztin-more-intermediates-no=No -bztin-more-intermediates-cable=Yes: Tinned cable +bztin-more-intermediates-cable=Yes: Only tinned cable +bztin-more-intermediates-bronze=Yes: Tinned cable & Bronze diff --git a/me.lua b/me.lua index 7821b67..ab569f3 100644 --- a/me.lua +++ b/me.lua @@ -4,7 +4,11 @@ me.name = "bztin" me.list = {} function me.use_cable() - return me.get_setting("bztin-more-intermediates") == "cable" + return me.get_setting("bztin-more-intermediates") == "cable" or me.use_bronze() +end + +function me.use_bronze() + return me.get_setting("bztin-more-intermediates") == "bronze" end function me.get_setting(name) diff --git a/settings.lua b/settings.lua index edc09c1..9ac5d54 100644 --- a/settings.lua +++ b/settings.lua @@ -17,6 +17,6 @@ data:extend({ name = "bztin-more-intermediates", setting_type = "startup", default_value = (mods.Krastorio2 or mods["space-exploration"]) and "cable" or "no", - allowed_values = {"cable", "no"}, + allowed_values = {"bronze", "cable", "no"}, }, }) diff --git a/tin-recipe-updates.lua b/tin-recipe-updates.lua index d9c626c..ff68b68 100644 --- a/tin-recipe-updates.lua +++ b/tin-recipe-updates.lua @@ -143,3 +143,19 @@ if util.me.use_cable() then util.replace_ingredient("buisart-lab", "copper-cable", "tinned-cable") util.replace_ingredient("energy-absorber", "copper-cable", "tinned-cable") end + +if util.me.use_bronze() then + local fast_i = mods.bzaluminum and "aluminum-plate" or "iron-plate" + util.replace_some_ingredient("fast-inserter", fast_i, 1, "bronze-plate", 1) + if mods.Krastorio2 then + util.replace_some_ingredient("filter-inserter", fast_i, 1, "bronze-plate", 1) + util.replace_ingredient("kr-steel-pump", "steel-beam", "bronze-plate", 4) + end + + util.replace_ingredient("pump", "steel-plate", "bronze-plate", 2) + util.replace_ingredient("storage-tank", "steel-plate", "bronze-plate", 10) + + util.add_ingredient("electric-engine-unit", "bronze-plate", 1) + + util.replace_some_ingredient("se-heavy-bearing", "se-iridium-plate", 1, "bronze-plate", 1) +end diff --git a/tin-recipe.lua b/tin-recipe.lua index 6fc80ca..a08ace1 100644 --- a/tin-recipe.lua +++ b/tin-recipe.lua @@ -167,4 +167,45 @@ data:extend({ util.add_prerequisite("tinned-cable", "copper-processing") end +if util.me.use_bronze() then +local bronze_i = {} +bronze_i["copper-plate"] = 17 +bronze_i["tin-plate"] = 3 +if mods.bzaluminum then + bronze_i["copper-plate"] = bronze_i["copper-plate"] - 1 + bronze_i["aluminum-plate"] = 1 +end + +data:extend({ + { + type = "item", + name = "bronze-plate", + icon = "__bztin__/graphics/icons/bronze-plate.png", + icon_size = 128, + subgroup = "intermediate-product", + order = "b[bronze-plate]", + stack_size = util.get_stack_size(100), + }, + { + type = "recipe", + name = "bronze-plate", + category = "advanced-crafting", + order = "d[bronze-plate]", + enabled = false, + energy_required = 60, + ingredients = {}, + results = {{"bronze-plate", 20}}, + }, +}) +for item, count in pairs(bronze_i) do + util.add_ingredient("bronze-plate", item, count) +end +if mods.bzfoundry then + util.add_effect("foundry", { type = "unlock-recipe", recipe = "bronze-plate" }) + util.add_prerequisite("fast-inserter", "foundry") + util.set_to_founding("bronze-plate") +else + util.add_effect("automation", { type = "unlock-recipe", recipe = "bronze-plate" }) +end +end end