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

[K2+SE] Fix inserter recipes when inserter overhaul is enabled #164

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions boblogistics/data-final-fixes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,39 @@ if mods["space-exploration"] then
{ "se-energy-science-pack-2", 1 },
}
end

-- K2+SE Fixes
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.

-- 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:
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
Expand Down