From 477824c05b8ba91819666d4a334f877a38420ad1 Mon Sep 17 00:00:00 2001 From: KiwiHawk <59639+KiwiHawk@users.noreply.github.com> Date: Sun, 8 Sep 2024 00:00:46 +1200 Subject: [PATCH] Bob's Modules Lab has been removed Differentiate between Crystal Splinter Processing 1 & 2 and Crystal Shard Processing 1 & 2 --- .../bio-processing-override-bobmodules.lua | 107 ++------------- .../unit-tests/unit-test-006.lua | 38 ------ .../overrides/global-tech-bobs-cores.lua | 15 --- .../overrides/global-tech-bobs-packs.lua | 125 +++++++++--------- .../prototypes/overrides/global-tech-data.lua | 13 +- 5 files changed, 71 insertions(+), 227 deletions(-) diff --git a/angelsbioprocessing/prototypes/overrides/bio-processing-override-bobmodules.lua b/angelsbioprocessing/prototypes/overrides/bio-processing-override-bobmodules.lua index ca62a4b63..9f55abbc0 100644 --- a/angelsbioprocessing/prototypes/overrides/bio-processing-override-bobmodules.lua +++ b/angelsbioprocessing/prototypes/overrides/bio-processing-override-bobmodules.lua @@ -42,11 +42,7 @@ if mods["bobmodules"] then order = "f-0-c", }, }) - if bobmods.modules.ModulesLab then - data.raw["tool"]["module-circuit-board"].subgroup = "module-intermediates-3" - else - data.raw["item"]["module-circuit-board"].subgroup = "module-intermediates-3" - end + data.raw["item"]["module-circuit-board"].subgroup = "module-intermediates-3" data.raw["item"]["module-contact"].subgroup = "module-intermediates-2" data.raw["item"]["module-processor-board-2"].subgroup = "module-intermediates-2" data.raw["item"]["module-processor-board-3"].subgroup = "module-intermediates-3" @@ -131,7 +127,9 @@ if mods["bobmodules"] then -- EXISTING MODULES TECHNOLOGY ---------------------------------------------- ----------------------------------------------------------------------------- -- tier 1 modules - OV.add_prereq("modules", "bio-processing-crystal-splinter-2") + OV.add_prereq("modules", "bio-processing-crystal-splinter-1") + OV.add_prereq("pollution-clean-module-1", "bio-processing-crystal-splinter-2") + OV.add_prereq("pollution-create-module-1", "bio-processing-crystal-splinter-2") for _, type in pairs({ "speed", "effectivity", "productivity" }) do -- remove the marked as upgrade from base game local tech = data.raw.technology[type .. "-module-2"] @@ -139,13 +137,9 @@ if mods["bobmodules"] then tech.upgrade = "false" end end - if bobmods.modules.ModulesLab then - OV.remove_science_pack("module-merging", { - "module-case", - "module-circuit-board", - }) - end -- tier 2 modules + OV.add_prereq("pollution-clean-module-3", "bio-processing-crystal-shard-2") + OV.add_prereq("pollution-create-module-3", "bio-processing-crystal-shard-2") data:extend({ { type = "technology", @@ -156,33 +150,13 @@ if mods["bobmodules"] then prerequisites = { "modules", "advanced-electronics-2", - "bio-processing-crystal-shard-2", + "bio-processing-crystal-shard-1", }, effects = { { type = "unlock-recipe", recipe = "module-processor-board-2", }, - { - type = "unlock-recipe", - recipe = "speed-processor-2", - }, - { - type = "unlock-recipe", - recipe = "effectivity-processor-2", - }, - { - type = "unlock-recipe", - recipe = "productivity-processor-2", - }, - { - type = "unlock-recipe", - recipe = "pollution-clean-processor-2", - }, - { - type = "unlock-recipe", - recipe = "pollution-create-processor-2", - }, }, unit = { count = 100, @@ -205,55 +179,15 @@ if mods["bobmodules"] then end end for _, type in pairs({ "speed", "effectivity", "productivity", "pollution-clean", "pollution-create" }) do - OV.remove_unlock(type .. "-module-3", type .. "-processor-2") OV.add_prereq(type .. "-module-3", "modules-2") OV.set_research_difficulty(type .. "-module-3", 60, 100) OV.set_research_difficulty(type .. "-module-4", 60, 150) OV.set_research_difficulty(type .. "-module-5", 60, 200) - if bobmods.modules.ModulesLab then - OV.set_science_pack({ - type .. "-module-5", - }, { - "module-case", - "module-circuit-board", - type .. "-processor", - }, { - 0, --module case - 1, --module-circuit-board - 2, --processor circuit board - }) - end end for _, type in pairs({ "raw-speed", "green", "raw-productivity" }) do OV.set_research_difficulty(type .. "-module-3", 60, 100) OV.set_research_difficulty(type .. "-module-4", 60, 150) OV.set_research_difficulty(type .. "-module-5", 60, 200) - if bobmods.modules.ModulesLab then - OV.set_science_pack({ - type .. "-module-5", - }, { - "module-case", - "module-circuit-board", - }, { - 0, --module case - 1, --module-circuit-board - }) - end - end - if bobmods.modules.ModulesLab then - OV.set_science_pack("raw-speed-module-5", { - "speed-processor", - "effectivity-processor", - }, 2) - OV.set_science_pack("green-module-5", { - "pollution-clean-processor", - "effectivity-processor", - }, 2) - OV.set_science_pack("raw-productivity-module-5", { - "pollution-clean-processor", - "effectivity-processor", - "productivity-processor", - }, 2) end -- tier 3 modules @@ -273,26 +207,6 @@ if mods["bobmodules"] then type = "unlock-recipe", recipe = "module-processor-board-3", }, - { - type = "unlock-recipe", - recipe = "speed-processor-3", - }, - { - type = "unlock-recipe", - recipe = "effectivity-processor-3", - }, - { - type = "unlock-recipe", - recipe = "productivity-processor-3", - }, - { - type = "unlock-recipe", - recipe = "pollution-clean-processor-3", - }, - { - type = "unlock-recipe", - recipe = "pollution-create-processor-3", - }, }, unit = { count = 100, @@ -308,7 +222,6 @@ if mods["bobmodules"] then }, }) for _, type in pairs({ "speed", "effectivity", "productivity", "pollution-clean", "pollution-create" }) do - OV.remove_unlock(type .. "-module-6", type .. "-processor-3") OV.add_prereq(type .. "-module-6", "modules-3") OV.set_research_difficulty(type .. "-module-6", 120, 300) OV.set_research_difficulty(type .. "-module-7", 120, 400) @@ -553,10 +466,6 @@ if mods["bobmodules"] then } end - if bobmods.modules.ModulesLab then - table.insert(data.raw.lab["lab-module"].inputs, "token-bio") - end - ----------------------------------------------------------------------------- -- BEACONS ------------------------------------------------------------------ ----------------------------------------------------------------------------- @@ -576,4 +485,6 @@ if mods["bobmodules"] then OV.add_prereq("effect-transmission", "modules") OV.add_prereq("effect-transmission-2", "modules-2") OV.add_prereq("effect-transmission-3", "modules-3") + OV.add_prereq("effect-transmission", "bio-processing-crystal-splinter-2") + OV.add_prereq("effect-transmission-2", "bio-processing-crystal-shard-2") end diff --git a/angelsdev-unit-test/unit-tests/unit-test-006.lua b/angelsdev-unit-test/unit-tests/unit-test-006.lua index bc3f96106..f86e7cdf0 100644 --- a/angelsdev-unit-test/unit-tests/unit-test-006.lua +++ b/angelsdev-unit-test/unit-tests/unit-test-006.lua @@ -113,44 +113,6 @@ local function calculate_science_pack_level() end end - if game.active_mods["bobmodules"] and settings.startup["bobmods-modules-enable-modules-lab"].value then - for pack_name, pack_level in pairs({ - -- bobs module science packs - ["speed-processor"] = ( - science_pack_level["angels-science-pack-orange"] or science_pack_level["logistic-science-pack"] - ), - ["effectivity-processor"] = ( - science_pack_level["angels-science-pack-orange"] or science_pack_level["logistic-science-pack"] - ), - ["productivity-processor"] = ( - science_pack_level["angels-science-pack-orange"] or science_pack_level["logistic-science-pack"] - ), - ["pollution-clean-processor"] = ( - science_pack_level["angels-science-pack-orange"] or science_pack_level["logistic-science-pack"] - ), - ["pollution-create-processor"] = ( - science_pack_level["angels-science-pack-orange"] or science_pack_level["logistic-science-pack"] - ), - ["module-circuit-board"] = ( - science_pack_level["angels-science-pack-blue"] or science_pack_level["chemical-science-pack"] - ), - ["module-case"] = ( - science_pack_level["angels-science-pack-yellow"] or science_pack_level["production-science-pack"] - ), - }) do - science_pack_level[pack_name] = pack_level - end - technologies_to_ignore["effectivity-module-5"] = true - technologies_to_ignore["green-module-1"] = true - technologies_to_ignore["god-module-1"] = true - technologies_to_ignore["pollution-clean-module-5"] = true - technologies_to_ignore["pollution-create-module-5"] = true - technologies_to_ignore["productivity-module-5"] = true - technologies_to_ignore["raw-productivity-module-1"] = true - technologies_to_ignore["raw-speed-module-1"] = true - technologies_to_ignore["speed-module-5"] = true - end - if game.active_mods["SeaBlock"] then for pack_name, pack_level in pairs({ ["sb-angelsore3-tool"] = 0, diff --git a/angelsindustries/prototypes/overrides/global-tech-bobs-cores.lua b/angelsindustries/prototypes/overrides/global-tech-bobs-cores.lua index 89a1e559e..f90e2ed92 100644 --- a/angelsindustries/prototypes/overrides/global-tech-bobs-cores.lua +++ b/angelsindustries/prototypes/overrides/global-tech-bobs-cores.lua @@ -124,21 +124,6 @@ if angelsmods.industries.tech then if mods["bobmodules"] then AI.core_replace("effect-transmission-2", "processing", "enhance") AI.core_replace("effect-transmission-3", "processing", "enhance") - if bobmods.modules.ModulesLab then - OV.remove_science_pack("speed-module", "angels-science-pack-orange") - OV.remove_science_pack("effectivity-module", "angels-science-pack-orange") - OV.remove_science_pack("productivity-module", "angels-science-pack-orange") - - OV.remove_science_pack("speed-module", "datacore-enhance-1") - OV.remove_science_pack("effectivity-module", "datacore-enhance-1") - OV.remove_science_pack("productivity-module", "datacore-enhance-1") - OV.remove_science_pack("angels-bio-yield-module", "datacore-enhance-1") - - OV.remove_science_pack("speed-module-3", "angels-science-pack-yellow") - OV.remove_science_pack("effectivity-module-3", "angels-science-pack-yellow") - OV.remove_science_pack("productivity-module-3", "angels-science-pack-yellow") - OV.remove_science_pack("angels-bio-yield-module-3", "angels-science-pack-yellow") - end end ------------------------------------------------------------------------------- diff --git a/angelsindustries/prototypes/overrides/global-tech-bobs-packs.lua b/angelsindustries/prototypes/overrides/global-tech-bobs-packs.lua index c121cedad..60a281106 100644 --- a/angelsindustries/prototypes/overrides/global-tech-bobs-packs.lua +++ b/angelsindustries/prototypes/overrides/global-tech-bobs-packs.lua @@ -129,70 +129,67 @@ if angelsmods.industries.tech then -- BOBS MODULES --------------------------------------------------------------- ------------------------------------------------------------------------------- if mods["bobmodules"] then - if bobmods.modules.ModulesLab then - OV.remove_science_pack("angels-bio-yield-module", "angels-science-pack-orange") - else - AI.pack_replace("angels-bio-yield-module-2", "green", "orange") - AI.pack_replace("angels-bio-yield-module-3", "yellow", "blue") - AI.pack_replace("angels-bio-yield-module-6", "blue", "yellow") - AI.pack_replace("angels-bio-yield-module-7", "blue", "yellow") - AI.pack_replace("angels-bio-yield-module-8", "blue", "yellow") - - AI.pack_replace("speed-module-2", "green", "orange") - AI.pack_replace("speed-module-3", "yellow", "blue") - AI.pack_replace("speed-module-6", "blue", "yellow") - AI.pack_replace("speed-module-7", "blue", "yellow") - AI.pack_replace("speed-module-8", "blue", "yellow") - - AI.pack_replace("effectivity-module-2", "green", "orange") - AI.pack_replace("effectivity-module-3", "yellow", "blue") - AI.pack_replace("effectivity-module-6", "blue", "yellow") - AI.pack_replace("effectivity-module-7", "blue", "yellow") - AI.pack_replace("effectivity-module-8", "blue", "yellow") - - AI.pack_replace("productivity-module-2", "green", "orange") - AI.pack_replace("productivity-module-3", "yellow", "blue") - AI.pack_replace("productivity-module-6", "blue", "yellow") - AI.pack_replace("productivity-module-7", "blue", "yellow") - AI.pack_replace("productivity-module-8", "blue", "yellow") - - AI.pack_replace("pollution-clean-module-1", "green", "orange") - AI.pack_replace("pollution-clean-module-2", "green", "orange") - AI.pack_replace("pollution-clean-module-6", "blue", "yellow") - AI.pack_replace("pollution-clean-module-7", "blue", "yellow") - AI.pack_replace("pollution-clean-module-8", "blue", "yellow") - - AI.pack_replace("pollution-create-module-1", "green", "orange") - AI.pack_replace("pollution-create-module-2", "green", "orange") - AI.pack_replace("pollution-create-module-6", "blue", "yellow") - AI.pack_replace("pollution-create-module-7", "blue", "yellow") - AI.pack_replace("pollution-create-module-8", "blue", "yellow") - - AI.pack_replace("module-merging", "green", "orange") - - AI.pack_replace("raw-speed-module-1", "green", "orange") - AI.pack_replace("raw-speed-module-2", "green", "orange") - AI.pack_replace("raw-speed-module-6", "blue", "yellow") - AI.pack_replace("raw-speed-module-7", "blue", "yellow") - AI.pack_replace("raw-speed-module-8", "blue", "yellow") - - AI.pack_replace("green-module-1", "green", "orange") - AI.pack_replace("green-module-2", "green", "orange") - AI.pack_replace("green-module-6", "blue", "yellow") - AI.pack_replace("green-module-7", "blue", "yellow") - AI.pack_replace("green-module-8", "blue", "yellow") - - AI.pack_replace("raw-productivity-module-1", "green", "orange") - AI.pack_replace("raw-productivity-module-2", "green", "orange") - AI.pack_replace("raw-productivity-module-6", "blue", "yellow") - AI.pack_replace("raw-productivity-module-7", "blue", "yellow") - AI.pack_replace("raw-productivity-module-8", "blue", "yellow") - - AI.pack_replace("god-module-1", "green", "orange") - AI.pack_replace("god-module-3", "blue", "yellow") - AI.pack_replace("god-module-4", "blue", "yellow") - AI.pack_replace("god-module-5", "blue", "yellow") - end + AI.pack_replace("angels-bio-yield-module-2", "green", "orange") + AI.pack_replace("angels-bio-yield-module-3", "yellow", "blue") + AI.pack_replace("angels-bio-yield-module-6", "blue", "yellow") + AI.pack_replace("angels-bio-yield-module-7", "blue", "yellow") + AI.pack_replace("angels-bio-yield-module-8", "blue", "yellow") + + AI.pack_replace("speed-module-2", "green", "orange") + AI.pack_replace("speed-module-3", "yellow", "blue") + AI.pack_replace("speed-module-6", "blue", "yellow") + AI.pack_replace("speed-module-7", "blue", "yellow") + AI.pack_replace("speed-module-8", "blue", "yellow") + + AI.pack_replace("effectivity-module-2", "green", "orange") + AI.pack_replace("effectivity-module-3", "yellow", "blue") + AI.pack_replace("effectivity-module-6", "blue", "yellow") + AI.pack_replace("effectivity-module-7", "blue", "yellow") + AI.pack_replace("effectivity-module-8", "blue", "yellow") + + AI.pack_replace("productivity-module-2", "green", "orange") + AI.pack_replace("productivity-module-3", "yellow", "blue") + AI.pack_replace("productivity-module-6", "blue", "yellow") + AI.pack_replace("productivity-module-7", "blue", "yellow") + AI.pack_replace("productivity-module-8", "blue", "yellow") + + AI.pack_replace("pollution-clean-module-1", "green", "orange") + AI.pack_replace("pollution-clean-module-2", "green", "orange") + AI.pack_replace("pollution-clean-module-6", "blue", "yellow") + AI.pack_replace("pollution-clean-module-7", "blue", "yellow") + AI.pack_replace("pollution-clean-module-8", "blue", "yellow") + + AI.pack_replace("pollution-create-module-1", "green", "orange") + AI.pack_replace("pollution-create-module-2", "green", "orange") + AI.pack_replace("pollution-create-module-6", "blue", "yellow") + AI.pack_replace("pollution-create-module-7", "blue", "yellow") + AI.pack_replace("pollution-create-module-8", "blue", "yellow") + + AI.pack_replace("module-merging", "green", "orange") + + AI.pack_replace("raw-speed-module-1", "green", "orange") + AI.pack_replace("raw-speed-module-2", "green", "orange") + AI.pack_replace("raw-speed-module-6", "blue", "yellow") + AI.pack_replace("raw-speed-module-7", "blue", "yellow") + AI.pack_replace("raw-speed-module-8", "blue", "yellow") + + AI.pack_replace("green-module-1", "green", "orange") + AI.pack_replace("green-module-2", "green", "orange") + AI.pack_replace("green-module-6", "blue", "yellow") + AI.pack_replace("green-module-7", "blue", "yellow") + AI.pack_replace("green-module-8", "blue", "yellow") + + AI.pack_replace("raw-productivity-module-1", "green", "orange") + AI.pack_replace("raw-productivity-module-2", "green", "orange") + AI.pack_replace("raw-productivity-module-6", "blue", "yellow") + AI.pack_replace("raw-productivity-module-7", "blue", "yellow") + AI.pack_replace("raw-productivity-module-8", "blue", "yellow") + + AI.pack_replace("god-module-1", "green", "orange") + AI.pack_replace("god-module-3", "blue", "yellow") + AI.pack_replace("god-module-4", "blue", "yellow") + AI.pack_replace("god-module-5", "blue", "yellow") + AI.pack_replace("modules-3", "blue", "yellow") AI.pack_replace("effect-transmission", "yellow", "orange") OV.remove_prereq("effect-transmission-2", "production-science-pack") diff --git a/angelsindustries/prototypes/overrides/global-tech-data.lua b/angelsindustries/prototypes/overrides/global-tech-data.lua index e54999037..de88870e5 100644 --- a/angelsindustries/prototypes/overrides/global-tech-data.lua +++ b/angelsindustries/prototypes/overrides/global-tech-data.lua @@ -49,18 +49,7 @@ if angelsmods.industries.tech then angelsmods.functions.add_exception("bio-swamp-farming") angelsmods.functions.add_exception("bio-swamp-farm") - -- EXCLUDE BOBS MODULES - if mods["bobmodules"] and bobmods.modules.ModulesLab then - angelsmods.functions.add_exception("module-merging") - --removes enhancement core from module techs (not modules) - for rec_4tech in pairs(data.raw.technology) do - --fix modules to still work in bobs module lab - if string.find(rec_4tech, "%-module%-") ~= nil then - angelsmods.functions.add_exception(rec_4tech) - end - end - end - + -- EXCLUDE BOBS ALIEN TECHS if mods["bobtech"] then for _, ignore in pairs({ --blue artifact tech