Skip to content

Commit

Permalink
Fixing check for module case #184
Browse files Browse the repository at this point in the history
If modules lab is disabled, then module case will be an item not a tool (aka science pack)
  • Loading branch information
KiwiHawk committed Jun 18, 2024
1 parent b34b2b3 commit e22b212
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bobclasses/prototypes/recipe-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ elseif data.raw.item["alien-artifact"] then
bobmods.lib.recipe.add_ingredient("player-power-core", { "alien-artifact", 50 })
end

if data.raw.tool["module-case"] then
if data.raw.tool["module-case"] or data.raw.item["module-case"] then
bobmods.lib.recipe.remove_ingredient("player-brain", "iron-plate")
bobmods.lib.recipe.add_ingredient("player-brain", { "module-case", 1 })
bobmods.lib.recipe.remove_ingredient("player-brain-2", "steel-plate")
Expand Down
2 changes: 1 addition & 1 deletion bobequipment/prototypes/recipe/updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ if data.raw.item["solder"] then
bobmods.lib.recipe.add_ingredient("personal-roboport-robot-equipment-4", { "solder", 6 })
end

if data.raw.tool["module-case"] then
if data.raw.tool["module-case"] or data.raw.item["module-case"] then
bobmods.lib.recipe.add_ingredient("personal-roboport-robot-equipment", { "module-case", 1 })
bobmods.lib.tech.add_prerequisite("personal-roboport-modular-equipment-1", "modules")
end
Expand Down
2 changes: 1 addition & 1 deletion bobvehicleequipment/prototypes/recipe-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ if data.raw.item["solder"] then
bobmods.lib.recipe.add_ingredient("vehicle-roboport-robot-equipment-4", { "solder", 6 })
end

if data.raw.tool["module-case"] then
if data.raw.tool["module-case"] or data.raw.item["module-case"] then
bobmods.lib.recipe.add_ingredient("vehicle-roboport-robot-equipment", { "module-case", 1 })
bobmods.lib.tech.add_prerequisite("vehicle-roboport-modular-equipment-1", "modules")
end
Expand Down
2 changes: 1 addition & 1 deletion bobwarfare/prototypes/spidertron-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ if settings.startup["bobmods-warfare-spidertron-overhaul"].value == true then
end

local function add_case()
if data.raw.tool["module-case"] then
if data.raw.tool["module-case"] or data.raw.item["module-case"] then
bobmods.lib.recipe.add_ingredient("mech-brain", { "module-case", 2 })
bobmods.lib.tech.add_prerequisite("walking-vehicle", "modules")
elseif data.raw.item["aluminium-plate"] then
Expand Down

0 comments on commit e22b212

Please sign in to comment.