Skip to content

Commit

Permalink
Power armor ingredients and prerequisites
Browse files Browse the repository at this point in the history
  • Loading branch information
KiwiHawk committed May 29, 2024
1 parent 825eee8 commit 33b0d41
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 45 deletions.
4 changes: 2 additions & 2 deletions bobwarfare/prototypes/recipe/armor-recipe.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ data:extend({
{ "processing-unit", 50 },
{ "steel-plate", 25 },
{ "iron-plate", 25 },
{ "effectivity-module-3", 5 },
{ "speed-module-3", 5 },
{ "effectivity-module-2", 5 },
{ "speed-module-2", 5 },
},
result = "bob-power-armor-mk3",
},
Expand Down
49 changes: 27 additions & 22 deletions bobwarfare/prototypes/recipe/recipe-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -300,28 +300,33 @@ if data.raw.item["diamond-5"] then
bobmods.lib.recipe.add_ingredient("bob-laser-turret-5", { "diamond-5", 1 })
end

if data.raw.module["effectivity-module-4"] then
bobmods.lib.recipe.replace_ingredient("bob-power-armor-mk3", "effectivity-module-3", "effectivity-module-4")
end

if data.raw.module["speed-module-4"] then
bobmods.lib.recipe.replace_ingredient("bob-power-armor-mk3", "speed-module-3", "speed-module-4")
end

if data.raw.module["effectivity-module-6"] then
bobmods.lib.recipe.replace_ingredient("bob-power-armor-mk4", "effectivity-module-3", "effectivity-module-6")
end

if data.raw.module["speed-module-6"] then
bobmods.lib.recipe.replace_ingredient("bob-power-armor-mk4", "speed-module-3", "speed-module-6")
end

if data.raw.module["effectivity-module-8"] then
bobmods.lib.recipe.replace_ingredient("bob-power-armor-mk5", "effectivity-module-3", "effectivity-module-8")
end

if data.raw.module["speed-module-8"] then
bobmods.lib.recipe.replace_ingredient("bob-power-armor-mk5", "speed-module-3", "speed-module-8")
if mods["bobmodules"] then
if data.raw.module["effectivity-module-4"] then
bobmods.lib.recipe.replace_ingredient("bob-power-armor-mk3", "effectivity-module-2", "effectivity-module-4")
end

if data.raw.module["speed-module-4"] then
bobmods.lib.recipe.replace_ingredient("bob-power-armor-mk3", "speed-module-2", "speed-module-4")
end

if data.raw.module["effectivity-module-6"] then
bobmods.lib.recipe.replace_ingredient("bob-power-armor-mk4", "effectivity-module-3", "effectivity-module-6")
end

if data.raw.module["speed-module-6"] then
bobmods.lib.recipe.replace_ingredient("bob-power-armor-mk4", "speed-module-3", "speed-module-6")
end

if data.raw.module["effectivity-module-8"] then
bobmods.lib.recipe.replace_ingredient("bob-power-armor-mk5", "effectivity-module-3", "effectivity-module-8")
end

if data.raw.module["speed-module-8"] then
bobmods.lib.recipe.replace_ingredient("bob-power-armor-mk5", "speed-module-3", "speed-module-8")
end
else
bobmods.lib.recipe.replace_ingredient("power-armor-mk2", "speed-module-2", "speed-module")
bobmods.lib.recipe.replace_ingredient("power-armor-mk2", "effectivity-module-2", "effectivity-module")
end

if data.raw.item["alien-artifact"] then
Expand Down
6 changes: 4 additions & 2 deletions bobwarfare/prototypes/technology/armor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ data:extend({
icon = "__bobwarfare__/graphics/icons/technology/power-armor-mk3.png",
icon_size = 64,
prerequisites = {
"effectivity-module-3",
"effectivity-module-2",
"power-armor-mk2",
"speed-module-3",
"speed-module-2",
"production-science-pack",
},
effects = {
Expand Down Expand Up @@ -93,6 +93,8 @@ data:extend({
icon_size = 64,
prerequisites = {
"bob-power-armor-3",
"effectivity-module-3",
"speed-module-3",
"utility-science-pack",
},
effects = {
Expand Down
43 changes: 24 additions & 19 deletions bobwarfare/prototypes/technology/technology-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -526,30 +526,35 @@ if data.raw.recipe["gun-cotton-synthetic"] then
bobmods.lib.tech.add_recipe_unlock("cordite-processing", "gun-cotton-synthetic")
end

if data.raw.technology["speed-module-4"] then
bobmods.lib.tech.remove_prerequisite("bob-power-armor-3", "speed-module-3")
bobmods.lib.tech.add_prerequisite("bob-power-armor-3", "speed-module-4")
end
if mods["bobmodules"] then
if data.raw.technology["speed-module-4"] then
bobmods.lib.tech.remove_prerequisite("bob-power-armor-3", "speed-module-2")
bobmods.lib.tech.add_prerequisite("bob-power-armor-3", "speed-module-4")
end

if data.raw.technology["effectivity-module-4"] then
bobmods.lib.tech.remove_prerequisite("bob-power-armor-3", "effectivity-module-3")
bobmods.lib.tech.add_prerequisite("bob-power-armor-3", "effectivity-module-4")
end
if data.raw.technology["effectivity-module-4"] then
bobmods.lib.tech.remove_prerequisite("bob-power-armor-3", "effectivity-module-2")
bobmods.lib.tech.add_prerequisite("bob-power-armor-3", "effectivity-module-4")
end

if data.raw.technology["speed-module-6"] then
bobmods.lib.tech.add_prerequisite("bob-power-armor-4", "speed-module-6")
end
if data.raw.technology["speed-module-6"] then
bobmods.lib.tech.add_prerequisite("bob-power-armor-4", "speed-module-6")
end

if data.raw.technology["effectivity-module-6"] then
bobmods.lib.tech.add_prerequisite("bob-power-armor-4", "effectivity-module-6")
end
if data.raw.technology["effectivity-module-6"] then
bobmods.lib.tech.add_prerequisite("bob-power-armor-4", "effectivity-module-6")
end

if data.raw.technology["speed-module-8"] then
bobmods.lib.tech.add_prerequisite("bob-power-armor-5", "speed-module-8")
end
if data.raw.technology["speed-module-8"] then
bobmods.lib.tech.add_prerequisite("bob-power-armor-5", "speed-module-8")
end

if data.raw.technology["effectivity-module-8"] then
bobmods.lib.tech.add_prerequisite("bob-power-armor-5", "effectivity-module-8")
if data.raw.technology["effectivity-module-8"] then
bobmods.lib.tech.add_prerequisite("bob-power-armor-5", "effectivity-module-8")
end
else
bobmods.lib.tech.replace_prerequisite("power-armor-mk2", "speed-module-2", "speed-module")
bobmods.lib.tech.replace_prerequisite("power-armor-mk2", "effectivity-module-2", "effectivity-module")
end

if mods["boblogistics"] then
Expand Down

0 comments on commit 33b0d41

Please sign in to comment.