Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equipment #183

Merged
merged 14 commits into from
Jun 2, 2024
24 changes: 19 additions & 5 deletions bobequipment/prototypes/recipe/equipment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ bobmods.lib.recipe.replace_ingredient("energy-shield-equipment", "advanced-circu
data.raw.recipe["energy-shield-mk2-equipment"].ingredients = {
{ "energy-shield-equipment", 2 },
{ "advanced-circuit", 5 },
{ "productivity-module", 1 },
}

data:extend({
Expand Down Expand Up @@ -58,7 +59,13 @@ data:extend({
},
})

data.raw.recipe["battery-mk2-equipment"].ingredients = { { "battery-equipment", 2 }, { "processing-unit", 5 } }
bobmods.lib.recipe.remove_ingredient("battery-equipment", "steel-plate")
bobmods.lib.recipe.add_ingredient("battery-equipment", { "electronic-circuit", 5 })

data.raw.recipe["battery-mk2-equipment"].ingredients = {
{ "battery-equipment", 2 },
{ "advanced-circuit", 5 },
}

data:extend({
{
Expand Down Expand Up @@ -152,6 +159,7 @@ data:extend({
},
})

bobmods.lib.recipe.replace_ingredient("night-vision-equipment", "advanced-circuit", "electronic-circuit")
data:extend({
{
type = "recipe",
Expand All @@ -160,7 +168,7 @@ data:extend({
energy_required = 10,
ingredients = {
{ "night-vision-equipment", 1 },
{ "processing-unit", 5 },
{ "advanced-circuit", 5 },
{ "plastic-bar", 2 },
},
result = "night-vision-equipment-2",
Expand Down Expand Up @@ -224,8 +232,11 @@ data:extend({
},
})

data.raw.recipe["personal-laser-defense-equipment"].ingredients =
{ { "steel-plate", 5 }, { "electronic-circuit", 5 }, { "battery", 3 } }
data.raw.recipe["personal-laser-defense-equipment"].ingredients = {
{ "steel-plate", 5 },
{ "advanced-circuit", 5 },
{ "battery", 3 },
}

data:extend({
{
Expand All @@ -249,7 +260,7 @@ data:extend({
ingredients = {
{ "personal-laser-defense-equipment-2", 1 },
{ "steel-plate", 5 },
{ "advanced-circuit", 5 },
{ "processing-unit", 5 },
{ "battery", 3 },
},
result = "personal-laser-defense-equipment-3",
Expand Down Expand Up @@ -295,6 +306,7 @@ data:extend({
},
})

bobmods.lib.recipe.replace_ingredient("exoskeleton-equipment", "processing-unit", "advanced-circuit")
data:extend({
{
type = "recipe",
Expand Down Expand Up @@ -323,3 +335,5 @@ data:extend({
result = "exoskeleton-equipment-3",
},
})

bobmods.lib.recipe.replace_ingredient("belt-immunity-equipment", "advanced-circuit", "electronic-circuit")
12 changes: 7 additions & 5 deletions bobequipment/prototypes/recipe/updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -347,12 +347,9 @@ if data.raw.item["silicon-wafer"] then
bobmods.lib.recipe.add_ingredient("solar-panel-equipment-3", { "silicon-wafer", 8 })
end

bobmods.lib.recipe.replace_ingredient("exoskeleton-equipment", "processing-unit", "advanced-circuit")

if data.raw.item["advanced-processing-unit"] then
bobmods.lib.recipe.replace_ingredient("energy-shield-mk3-equipment", "processing-unit", "advanced-processing-unit")
bobmods.lib.tech.add_prerequisite("bob-energy-shield-equipment-3", "advanced-electronics-3")
bobmods.lib.recipe.replace_ingredient("energy-shield-mk4-equipment", "processing-unit", "advanced-processing-unit")
bobmods.lib.tech.add_prerequisite("bob-energy-shield-equipment-4", "advanced-electronics-3")
bobmods.lib.recipe.replace_ingredient("energy-shield-mk5-equipment", "processing-unit", "advanced-processing-unit")
bobmods.lib.recipe.replace_ingredient("energy-shield-mk6-equipment", "processing-unit", "advanced-processing-unit")
bobmods.lib.recipe.replace_ingredient("battery-mk4-equipment", "processing-unit", "advanced-processing-unit")
Expand All @@ -366,12 +363,17 @@ if data.raw.item["advanced-processing-unit"] then
bobmods.lib.tech.add_prerequisite("night-vision-equipment-3", "advanced-electronics-3")
bobmods.lib.recipe.replace_ingredient("solar-panel-equipment-4", "processing-unit", "advanced-processing-unit")
bobmods.lib.tech.add_prerequisite("solar-panel-equipment-4", "advanced-electronics-3")
bobmods.lib.recipe.replace_ingredient(
"personal-laser-defense-equipment-5",
"processing-unit",
"advanced-processing-unit"
)
bobmods.lib.recipe.replace_ingredient(
"personal-laser-defense-equipment-6",
"processing-unit",
"advanced-processing-unit"
)
bobmods.lib.tech.add_prerequisite("personal-laser-defense-equipment-6", "advanced-electronics-3")
bobmods.lib.tech.add_prerequisite("personal-laser-defense-equipment-5", "advanced-electronics-3")
bobmods.lib.recipe.replace_ingredient("exoskeleton-equipment-3", "processing-unit", "advanced-processing-unit")
bobmods.lib.tech.add_prerequisite("exoskeleton-equipment-3", "advanced-electronics-3")
end
Expand Down
13 changes: 12 additions & 1 deletion bobequipment/prototypes/technology/equipment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ data.raw["technology"]["energy-shield-mk2-equipment"].icons = bobmods.equipment.
icon_size = 128,
})
bobmods.lib.tech.remove_prerequisite("energy-shield-mk2-equipment", "low-density-structure")
bobmods.lib.tech.add_prerequisite("energy-shield-mk2-equipment", "productivity-module")

data:extend({
{
Expand All @@ -14,6 +15,7 @@ data:extend({
}),
order = "g-e-c",
prerequisites = {
"advanced-electronics-2",
"energy-shield-mk2-equipment",
"productivity-module-2",
"production-science-pack",
Expand Down Expand Up @@ -179,6 +181,7 @@ data:extend({
}),
order = "g-i-d",
prerequisites = {
"advanced-electronics-2",
"bob-battery-equipment-3",
"production-science-pack",
},
Expand Down Expand Up @@ -374,8 +377,8 @@ data:extend({
}),
order = "g-g-b",
prerequisites = {
"chemical-science-pack",
"night-vision-equipment",
"advanced-electronics-2",
},
effects = {
{
Expand Down Expand Up @@ -405,6 +408,7 @@ data:extend({
icon_mipmaps = 4,
order = "g-g-c",
prerequisites = {
"advanced-electronics-2",
"night-vision-equipment-2",
"production-science-pack",
},
Expand Down Expand Up @@ -529,6 +533,8 @@ data.raw["technology"]["personal-laser-defense-equipment"].icons =
icon_size = 128,
})
bobmods.lib.tech.remove_prerequisite("personal-laser-defense-equipment", "low-density-structure")
bobmods.lib.tech.remove_prerequisite("personal-laser-defense-equipment", "military-3")
bobmods.lib.tech.remove_science_pack("personal-laser-defense-equipment", "chemical-science-pack")

data:extend({
{
Expand All @@ -540,6 +546,7 @@ data:extend({
}),
order = "g-m-b",
prerequisites = {
"chemical-science-pack",
"personal-laser-defense-equipment",
},
effects = {
Expand Down Expand Up @@ -569,6 +576,7 @@ data:extend({
}),
order = "g-m-c",
prerequisites = {
"advanced-electronics-2",
"personal-laser-defense-equipment-2",
"production-science-pack",
},
Expand Down Expand Up @@ -685,6 +693,9 @@ data:extend({
},
})

bobmods.lib.tech.remove_prerequisite("exoskeleton-equipment", "advanced-electronics-2")
bobmods.lib.tech.add_prerequisite("exoskeleton-equipment", "advanced-electronics")

data:extend({
{
type = "technology",
Expand Down
8 changes: 6 additions & 2 deletions bobequipment/prototypes/technology/technology-updates.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
if mods["boblogistics"] then
-- Bob's Logistics mod removes blue science from Electric engine and Robotics
if mods["boblogistics"] or mods["bobplates"] then
-- Bob's Logistics mod and Bob's MCI mod remove blue science from Electric engine and Robotics

bobmods.lib.tech.remove_science_pack("exoskeleton-equipment", "chemical-science-pack")
bobmods.lib.tech.remove_prerequisite("exoskeleton-equipment", "advanced-electronics-2")
end

if mods["boblogistics"] then
-- Bob's Logistics mod removes blue science from Electric engine

bobmods.lib.tech.remove_prerequisite("personal-roboport-equipment", "chemical-science-pack")
bobmods.lib.tech.remove_science_pack("personal-roboport-equipment", "chemical-science-pack")
Expand Down
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
46 changes: 27 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 Expand Up @@ -579,10 +584,13 @@ bobmods.lib.tech.add_prerequisite("power-armor", "advanced-electronics")
-- By default, electric engines are Blue Science
if (not mods["bobplates"]) and not mods["boblogistics"] then
bobmods.lib.tech.remove_prerequisite("power-armor", "electric-engine")
bobmods.lib.tech.add_prerequisite("power-armor-mk2", "electric-engine")
end

bobmods.lib.tech.remove_science_pack("power-armor-mk2", "utility-science-pack")
bobmods.lib.tech.remove_prerequisite("power-armor-mk2", "military-4")
bobmods.lib.tech.add_prerequisite("power-armor-mk2", "military-3")
bobmods.lib.tech.add_prerequisite("power-armor-mk2", "low-density-structure")

bobmods.lib.tech.replace_prerequisite("battery-mk2-equipment", "power-armor", "chemical-science-pack")
bobmods.lib.tech.replace_prerequisite("discharge-defense-equipment", "power-armor", "advanced-electronics-2")
Loading