Skip to content

Commit

Permalink
Bob's Modules Lab has been removed
Browse files Browse the repository at this point in the history
Differentiate between Crystal Splinter Processing 1 & 2 and Crystal Shard Processing 1 & 2
  • Loading branch information
KiwiHawk committed Sep 7, 2024
1 parent e7af57f commit 477824c
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 227 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -131,21 +127,19 @@ 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"]
if tech 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",
Expand All @@ -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,
Expand All @@ -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
Expand All @@ -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,
Expand All @@ -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)
Expand Down Expand Up @@ -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 ------------------------------------------------------------------
-----------------------------------------------------------------------------
Expand All @@ -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
38 changes: 0 additions & 38 deletions angelsdev-unit-test/unit-tests/unit-test-006.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
15 changes: 0 additions & 15 deletions angelsindustries/prototypes/overrides/global-tech-bobs-cores.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

-------------------------------------------------------------------------------
Expand Down
125 changes: 61 additions & 64 deletions angelsindustries/prototypes/overrides/global-tech-bobs-packs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Loading

0 comments on commit 477824c

Please sign in to comment.