Skip to content

Commit

Permalink
Merge branch 'dev' into pr/156
Browse files Browse the repository at this point in the history
  • Loading branch information
KiwiHawk committed Jan 6, 2024
2 parents 358cfdb + f618959 commit 8ed0291
Showing 1 changed file with 36 additions and 33 deletions.
69 changes: 36 additions & 33 deletions boblogistics/data-final-fixes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,43 +62,46 @@ if mods["space-exploration"] then
end

--Krastorio2+SE fixes
if mods["Krastorio2"] then
data.raw.pump.pump.fast_replaceable_group = "pipe"
if mods["Krastorio2"] and settings.startup["bobmods-logistics-inserteroverhaul"].value == true then
-- when both Krastorio and Space Exploration are installed,
-- then Space Exploration resets the `long-handed-inserter`
-- and `fast-inserter` recipes in a way which includes items
-- from both mods and making the Express Inserter ingredients
-- match what Bob's Logistics does with the Fast Inserter,
-- so just copy the ingredients over

if settings.startup["bobmods-logistics-inserteroverhaul"].value == true then
-- when both Krastorio and Space Exploration are installed,
-- then Space Exploration resets the `long-handed-inserter`
-- and `fast-inserter` recipes in a way which includes items
-- from both mods and making the Express Inserter ingredients
-- match what Bob's Logistics does with the Fast Inserter,
-- so just copy the ingredients over

-- Fast Inserter:
if data.raw.recipe["long-handed-inserter"] then
-- 2 x Electronic Circuit
-- 1 x Inserter / Inserter Parts
-- 1 x Steel Plate
if data.raw.recipe["fast-inserter"] then
bobmods.lib.recipe.set_ingredients("long-handed-inserter", data.raw.recipe["fast-inserter"].ingredients)
else
bobmods.lib.recipe.replace_ingredient("long-handed-inserter", "iron-stick", "electornic-circuit")
bobmods.lib.recipe.add_ingredient("long-handed-inserter", "steel-plate")
end
end

-- Express Inserter:
-- Fast Inserter:
if data.raw.recipe["long-handed-inserter"] then
-- 2 x Electronic Circuit
-- 1 x Inserter / Inserter Parts
-- 1 x Steel Plate
if data.raw.recipe["fast-inserter"] then
-- 2 x Adv. Circuit
-- 1 x Fast Inserter / Inserter Parts
-- 1 x Small Electric Motor
bobmods.lib.recipe.replace_ingredient("fast-inserter", "inserter", "long-handed-inserter")
bobmods.lib.recipe.replace_ingredient("fast-inserter", "electornic-circuit", "advanced-circuit")
bobmods.lib.recipe.replace_ingredient("fast-inserter", "steel-plate", "electric-motor")
bobmods.lib.recipe.set_ingredients("long-handed-inserter", data.raw.recipe["fast-inserter"].ingredients)
else
bobmods.lib.recipe.replace_ingredient("long-handed-inserter", "iron-stick", "electornic-circuit")
bobmods.lib.recipe.add_ingredient("long-handed-inserter", "steel-plate")
end
end

if data.raw.inserter["long-handed-inserter"] then
data.raw.inserter["long-handed-inserter"].fast_replaceable_group = "inserter"
end
-- Express Inserter:
if data.raw.recipe["fast-inserter"] then
-- 2 x Adv. Circuit
-- 1 x Fast Inserter / Inserter Parts
-- 1 x Small Electric Motor
bobmods.lib.recipe.replace_ingredient("fast-inserter", "inserter", "long-handed-inserter")
bobmods.lib.recipe.replace_ingredient("fast-inserter", "electornic-circuit", "advanced-circuit")
bobmods.lib.recipe.replace_ingredient("fast-inserter", "steel-plate", "electric-motor")
end

end
end

-- Krastorio2 fixes
if mods["Krastorio2"] then
data.raw.pump.pump.fast_replaceable_group = "pipe"
if
settings.startup["bobmods-logistics-inserteroverhaul"].value == true and data.raw.inserter["long-handed-inserter"]
then
data.raw.inserter["long-handed-inserter"].fast_replaceable_group = "inserter"
end
end

0 comments on commit 8ed0291

Please sign in to comment.