From e973d50ac6ce577ea32a0efcf1ac9fbc2e57e92d Mon Sep 17 00:00:00 2001 From: Brevven Date: Sun, 22 Nov 2020 20:32:25 -0800 Subject: [PATCH] underwater pipe support --- changelog.txt | 1 + titanium-recipe-final.lua | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/changelog.txt b/changelog.txt index ab78753..7613eed 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Version: 0.6.10 Date: 2020-11-21 Features: + - Rust-free underwater pipe support. - Hover-Car support - Extend Hovercrafts support to Hovercrafts_Realism --------------------------------------------------------------------------------------------------- diff --git a/titanium-recipe-final.lua b/titanium-recipe-final.lua index 69a2c67..2ebc798 100644 --- a/titanium-recipe-final.lua +++ b/titanium-recipe-final.lua @@ -94,3 +94,24 @@ if data.raw.item["memory-unit"] then util.steel_to_titanium(data.raw.recipe["memory-unit"].normal) util.steel_to_titanium(data.raw.recipe["memory-unit"].expensive) end + +-- Underwater pipes changes +if data.raw.item["underwater-pipe"] then + if data.raw.technology["underwater-pipes"] then + local index = -1 + for i, elem in pairs(data.raw.technology["underwater-pipes"].prerequisites) do + if elem == "steel-processing" then + index = i + end + end + if index > -1 then + table.remove(data.raw.technology["underwater-pipes"].prerequisites, index) + end + end + util.add_titanium_prerequisite(data.raw.technology["underwater-pipes"]) + + util.steel_to_titanium(data.raw.recipe["underwater-pipe"]) + util.steel_to_titanium(data.raw.recipe["underwater-pipe"].normal) + util.steel_to_titanium(data.raw.recipe["underwater-pipe"].expensive) +end +