diff --git a/changelog.txt b/changelog.txt index c25b86f..d4e9e3b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 1.0.4 +Date: 2022-02-04 + Fixes: + - Fix for some possible 5dim's loadouts +--------------------------------------------------------------------------------------------------- Version: 1.0.3 Date: 2022-01-24 Changes: diff --git a/data-util.lua b/data-util.lua index 46f501f..38e91d0 100644 --- a/data-util.lua +++ b/data-util.lua @@ -539,6 +539,15 @@ function util.set_icons(recipe_name, icons) end end +-- Set recipe icons +function util.set_item_icons(item_name, icons) + if data.raw.recipe[item_name] then + data.raw.recipe[item_name].icons = icons + data.raw.recipe[item_name].icon = nil + data.raw.recipe[item_name].icon_size = nil + end +end + function util.set_to_founding(recipe) util.set_category(recipe, "founding") util.set_subgroup(recipe, "foundry-intermediate") diff --git a/info.json b/info.json index 5ec1b1d..743c725 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bztitanium", - "version": "1.0.3", + "version": "1.0.4", "factorio_version": "1.1", "title": "Titanium", "author": "Brevven", @@ -21,6 +21,6 @@ "? EndgameCombat", "! nullius" ], - "description": "Adds titanium to the base game.\n\nTitanium is used in Low Density Structures, Flying Robot Frames and a few other places.\n\nCompatible with Krastorio 2, Space Exploration, Aircraft, 5Dim's, FE+ and other mods. A standalone piece of BZ Mods." + "description": "Adds titanium to the base game.\n\nTitanium is used in Low Density Structures, Flying Robot Frames and a few other places.\n\nCompatible with Krastorio 2, Space Exploration, Aircraft, 5Dim's, FE+ and other mods. A standalone piece of BZ Mods.\n\nWith graphics by snouz." } diff --git a/titanium-recipe-final-5d.lua b/titanium-recipe-final-5d.lua index 49260e7..dfecdb2 100644 --- a/titanium-recipe-final-5d.lua +++ b/titanium-recipe-final-5d.lua @@ -6,88 +6,91 @@ if mods["5dim_core"] then data.raw.recipe["titanium-plate"].subgroup = "plates-plates" data.raw.item["titanium-ore"].subgroup = "plates-ore" - -- Industrial furnace - data:extend({ - { - type = "recipe", - name = "titanium-plate-industrial-ore", - category = "industrial-furnace", - subgroup = "plates-industrial-ore", - order = "ad[titanium-plate]", - icon = "__bztitanium__/graphics/icons/titanium-plate.png", - icon_size = 64, icon_mipmaps = 3, - enabled = false, - energy_required = 140, - ingredients = {{"titanium-ore", 425}}, - result = util.me.titanium_plate, - result_count = 100, - } - }) - table.insert(data.raw.technology[util.me.titanium_processing].effects, - {type = "unlock-recipe", recipe="titanium-plate-industrial-ore"}) + if mods["5dim_resources"] then + + -- Industrial furnace + data:extend({ + { + type = "recipe", + name = "titanium-plate-industrial-ore", + category = "industrial-furnace", + subgroup = "plates-industrial-ore", + order = "ad[titanium-plate]", + icon = "__bztitanium__/graphics/icons/titanium-plate.png", + icon_size = 64, icon_mipmaps = 3, + enabled = false, + energy_required = 140, + ingredients = {{"titanium-ore", 425}}, + result = util.me.titanium_plate, + result_count = 100, + } + }) + table.insert(data.raw.technology[util.me.titanium_processing].effects, + {type = "unlock-recipe", recipe="titanium-plate-industrial-ore"}) - -- Titanium dust - data:extend( - { - { - type = "item", - name = "titanium-dust", - subgroup = "plates-dust", - order = "d[titanium-plate]", - icon = "__bztitanium__/graphics/icons/titanium-powder.png", - icon_size = 64, icon_mipmaps = 3, - stack_size = 200 - }, - { + -- Titanium dust + data:extend( + { + { + type = "item", + name = "titanium-dust", + subgroup = "plates-dust", + order = "d[titanium-plate]", + icon = "__bztitanium__/graphics/icons/titanium-powder.png", + icon_size = 64, icon_mipmaps = 3, + stack_size = 200 + }, + { + type = "recipe", + name = "titanium-plate-dust", + icon = "__bztitanium__/graphics/icons/titanium-plate.png", + icon_size = 64, icon_mipmaps = 3, + subgroup = "plates-plates2", + order = "d[titanium-plate]", + category = "smelting", + energy_required = 8, + enabled = false, + ingredients = { + {"titanium-dust", 5} + }, + result = util.me.titanium_plate + }, + { + type = "recipe", + name = "titanium-dust", + category = "mashering", + order = "d[titanium-plate]", + energy_required = 3.2, + enabled = false, + ingredients = { + {"titanium-ore", 1} + }, + result = "titanium-dust", + result_count = 2 + }, + { type = "recipe", - name = "titanium-plate-dust", + name = "titanium-plate-industrial-dust", + category = "industrial-furnace", + subgroup = "plates-industrial-dust", + order = "ad[titanium-plate]", icon = "__bztitanium__/graphics/icons/titanium-plate.png", icon_size = 64, icon_mipmaps = 3, - subgroup = "plates-plates2", - order = "d[titanium-plate]", - category = "smelting", - energy_required = 8, enabled = false, - ingredients = { - {"titanium-dust", 5} - }, - result = util.me.titanium_plate - }, - { - type = "recipe", - name = "titanium-dust", - category = "mashering", - order = "d[titanium-plate]", - energy_required = 3.2, - enabled = false, - ingredients = { - {"titanium-ore", 1} - }, - result = "titanium-dust", - result_count = 2 - }, - { - type = "recipe", - name = "titanium-plate-industrial-dust", - category = "industrial-furnace", - subgroup = "plates-industrial-dust", - order = "ad[titanium-plate]", - icon = "__bztitanium__/graphics/icons/titanium-plate.png", - icon_size = 64, icon_mipmaps = 3, - enabled = false, - energy_required = 140, - ingredients = {{"titanium-dust", 425}}, - result = util.me.titanium_plate, - result_count = 100, - } - }) - table.insert(data.raw.technology[util.me.titanium_processing].effects, - {type = "unlock-recipe", recipe="titanium-dust"}) - table.insert(data.raw.technology[util.me.titanium_processing].effects, - {type = "unlock-recipe", recipe="titanium-plate-dust"}) - table.insert(data.raw.technology[util.me.titanium_processing].effects, - {type = "unlock-recipe", recipe="titanium-plate-industrial-dust"}) + energy_required = 140, + ingredients = {{"titanium-dust", 425}}, + result = util.me.titanium_plate, + result_count = 100, + } + }) + table.insert(data.raw.technology[util.me.titanium_processing].effects, + {type = "unlock-recipe", recipe="titanium-dust"}) + table.insert(data.raw.technology[util.me.titanium_processing].effects, + {type = "unlock-recipe", recipe="titanium-plate-dust"}) + table.insert(data.raw.technology[util.me.titanium_processing].effects, + {type = "unlock-recipe", recipe="titanium-plate-industrial-dust"}) + end if mods["5dim_automation"] then for i, name in ipairs(