From 0b79489607a67ad3fe2f982c95a89045ba112381 Mon Sep 17 00:00:00 2001 From: Brevven Date: Fri, 5 Nov 2021 22:18:05 -0700 Subject: [PATCH] fixes --- changelog.txt | 11 +++++++++++ data-util.lua | 10 +++++----- titanium-recipe-final-se.lua | 4 ++++ titanium-recipe-se.lua | 18 ++++++++++++++++++ 4 files changed, 38 insertions(+), 5 deletions(-) diff --git a/changelog.txt b/changelog.txt index b7d8b4a..6ea0665 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,15 @@ --------------------------------------------------------------------------------------------------- +Version: 0.12.7 +Date: 2021-10-11 + Fixes: + - SE: Balance core mining + - SE: Landfill recipe +--------------------------------------------------------------------------------------------------- +Version: 0.12.6 +Date: 2021-08-13 + Fixes: + - SE: LDS no longer uses steel. +--------------------------------------------------------------------------------------------------- Version: 0.12.5 Date: 2021-07-28 Fixes: diff --git a/data-util.lua b/data-util.lua index 60edbfb..e6e7451 100644 --- a/data-util.lua +++ b/data-util.lua @@ -34,7 +34,7 @@ end -- Add a prerequisite to a given technology function util.add_prerequisite(technology_name, prerequisite) - technology = data.raw.technology[technology_name] + local technology = data.raw.technology[technology_name] if technology and data.raw.technology[prerequisite] then if technology.prerequisites then table.insert(technology.prerequisites, prerequisite) @@ -46,7 +46,7 @@ end -- Remove a prerequisite from a given technology function util.remove_prerequisite(technology_name, prerequisite) - technology = data.raw.technology[technology_name] + local technology = data.raw.technology[technology_name] local index = -1 if technology and data.raw.technology[prerequisite] then for i, prereq in pairs(technology.prerequisites) do @@ -63,7 +63,7 @@ end -- Add an effect to a given technology function util.add_effect(technology_name, effect) - technology = data.raw.technology[technology_name] + local technology = data.raw.technology[technology_name] if technology then table.insert(technology.effects, effect) end @@ -71,7 +71,7 @@ end -- Set technology ingredients function util.set_tech_recipe(technology_name, ingredients) - technology = data.raw.technology[technology_name] + local technology = data.raw.technology[technology_name] if technology then technology.unit.ingredients = ingredients end @@ -363,7 +363,7 @@ end function add_to_ingredient(recipe, it, amount) if recipe ~= nil and recipe.ingredients ~= nil then - for i, ingredient in pairs(recipe.ingredients) do + for i, ingredient in pairs(recipe.ingredients) do if ingredient.name == it then ingredient.amount = ingredient.amount + amount return diff --git a/titanium-recipe-final-se.lua b/titanium-recipe-final-se.lua index 8f658d2..85eb7ad 100644 --- a/titanium-recipe-final-se.lua +++ b/titanium-recipe-final-se.lua @@ -6,6 +6,9 @@ if data.raw.recipe["se-space-pipe"] then -- Organization data.raw.item[util.me.titanium_plate].subgroup = "plates" + -- core mining balancing + util.add_to_product("se-core-fragment-omni", "titanium-ore", -2) + -- deadlock loaders for SE -- mods["deadlock-beltboxes-loaders"] if mods["Deadlock-SE-bridge"] then if data.raw.recipe["se-space-transport-belt-loader"] then @@ -15,4 +18,5 @@ if data.raw.recipe["se-space-pipe"] then util.replace_ingredient("se-space-transport-belt-beltbox", "steel-plate", util.me.titanium_plate) end end + util.remove_ingredient("low-density-structure", "steel-plate") end diff --git a/titanium-recipe-se.lua b/titanium-recipe-se.lua index bc138d2..8762e0f 100644 --- a/titanium-recipe-se.lua +++ b/titanium-recipe-se.lua @@ -4,7 +4,25 @@ local util = require("__bztitanium__.data-util"); if mods["space-exploration"] then se_delivery_cannon_recipes["titanium-ore"] = {name= "titanium-ore"} se_delivery_cannon_recipes[util.me.titanium_plate] = {name= util.me.titanium_plate} + + data:extend({ + { + type = "recipe", + icons = { + { icon = "__base__/graphics/icons/landfill.png", icon_size = 64, icon_mipmaps = 3 }, + { icon = "__bztitanium__/graphics/icons/titanium-ore.png", icon_size = 64, scale = 0.25}, + }, + name = "landfill-titanium-ore", + category = "hard-recycling", + order = "z-b-titanium", + subgroup = "terrain", + result = "landfill", + ingredients = {{"titanium-ore", 50}}, + } + }) + if mods["Krastorio2"] then + data:extend({ { type = "recipe",