From b6d117e766f0377b6197949648c4c4327db42af8 Mon Sep 17 00:00:00 2001 From: KiwiHawk <59639+KiwiHawk@users.noreply.github.com> Date: Tue, 22 Aug 2023 07:06:37 +1200 Subject: [PATCH] Added configurable triggers for acetone and urea (#924, #928) --- .../prototypes/bio-processing-triggers.lua | 3 ++ .../overrides/global-tech-base-cores.lua | 2 ++ .../overrides/global-tech-base-packs.lua | 2 ++ angelspetrochem/changelog.txt | 1 + angelspetrochem/data.lua | 2 ++ .../prototypes/override/angelspetrochem.lua | 32 +++++++++++-------- 6 files changed, 29 insertions(+), 13 deletions(-) diff --git a/angelsbioprocessing/prototypes/bio-processing-triggers.lua b/angelsbioprocessing/prototypes/bio-processing-triggers.lua index f9c218bde..71e13558e 100644 --- a/angelsbioprocessing/prototypes/bio-processing-triggers.lua +++ b/angelsbioprocessing/prototypes/bio-processing-triggers.lua @@ -42,3 +42,6 @@ if angelsmods.triggers.bio_pastes["zinc"] then angelsmods.trigger.ores["zinc"] = true angelsmods.trigger.smelting_products["zinc"].powder = true end + +angelsmods.trigger.gas_acetone = true +angelsmods.trigger.gas_urea = true diff --git a/angelsindustries/prototypes/overrides/global-tech-base-cores.lua b/angelsindustries/prototypes/overrides/global-tech-base-cores.lua index 2749bf9ef..4e34895a8 100644 --- a/angelsindustries/prototypes/overrides/global-tech-base-cores.lua +++ b/angelsindustries/prototypes/overrides/global-tech-base-cores.lua @@ -22,6 +22,8 @@ if angelsmods.industries.tech then AI.core_replace("turrets", "war", "basic") AI.core_replace("flammables", "war", "enhance") -- REFINING + -- PETROCHEM + AI.core_replace("basic-chemistry", "processing", "basic") -- SMELTING AI.core_replace("angels-solder-smelting-basic", "processing", "basic") -- BIO PROCESSING diff --git a/angelsindustries/prototypes/overrides/global-tech-base-packs.lua b/angelsindustries/prototypes/overrides/global-tech-base-packs.lua index 87fa08eb8..35d26bb29 100644 --- a/angelsindustries/prototypes/overrides/global-tech-base-packs.lua +++ b/angelsindustries/prototypes/overrides/global-tech-base-packs.lua @@ -15,6 +15,8 @@ if angelsmods.industries.tech then "logistics", "turrets", -- REFINING + -- PETROCHEM + "basic-chemistry", -- SMELTING "angels-solder-smelting-basic", -- BIO PROCESSING diff --git a/angelspetrochem/changelog.txt b/angelspetrochem/changelog.txt index 1b2c53949..cfb971317 100644 --- a/angelspetrochem/changelog.txt +++ b/angelspetrochem/changelog.txt @@ -6,6 +6,7 @@ Date: ??.??.???? - Split tech Sodium processing into Sodium processing 1 and Sodium processing 2 (922) Bugfixes: - Fixed recipe order of carbon products to correctly display in helmod + - Fixed fertiliser not being craftable in mod configurations (924) --------------------------------------------------------------------------------------------------- Version: 0.9.24 Date: 23.02.2023 diff --git a/angelspetrochem/data.lua b/angelspetrochem/data.lua index 01739c6cc..7ecedb664 100644 --- a/angelspetrochem/data.lua +++ b/angelspetrochem/data.lua @@ -25,6 +25,8 @@ angelsmods.trigger.gas_ammonium_chloride = false angelsmods.trigger.early_sulfuric_acid = false angelsmods.trigger.gas_hydrogen_fluoride = settings.startup["angels-enable-acids"].value or (mods["angelsbioprocessing"] and true or false) +angelsmods.trigger.gas_acetone = angelsmods.trigger.resin +angelsmods.trigger.gas_urea = (mods["bobgreenhouse"] or angelsmods.trigger.resin) and true or false --HIDE UNUSED BUILDINGS angelsmods.trigger.disable_bobs_electrolysers = settings.startup["angels-disable-bobs-electrolysers"].value diff --git a/angelspetrochem/prototypes/override/angelspetrochem.lua b/angelspetrochem/prototypes/override/angelspetrochem.lua index 6ea4f8dba..5582ff837 100644 --- a/angelspetrochem/prototypes/override/angelspetrochem.lua +++ b/angelspetrochem/prototypes/override/angelspetrochem.lua @@ -184,25 +184,31 @@ end if angelsmods.functions.is_special_vanilla() then OV.disable_recipe({ "solid-calcium-chloride", - "cumene-process", -- "gas-acetone" - "gas-phosgene", }) OV.remove_prereq("angels-nitrogen-processing-2", "chlorine-processing-1") angelsmods.functions.add_flag({ "solid-calcium-chloride", - "gas-phosgene", }, "hidden") +end - if angelsmods.bioprocessing then - else - OV.disable_recipe({ - "gas-urea", - }) - angelsmods.functions.add_flag({ - "gas-urea", - "gas-acetone", - }, "hidden") - end +if angelsmods.trigger.gas_acetone then +else + OV.disable_recipe({ + "cumene-process", + }) + angelsmods.functions.add_flag({ + "gas-acetone", + }, "hidden") +end + +if angelsmods.trigger.gas_urea then +else + OV.disable_recipe({ + "gas-urea", + }) + angelsmods.functions.add_flag({ + "gas-urea", + }, "hidden") end if angelsmods.trigger.resin then