diff --git a/.luacheckrc b/.luacheckrc index 008e0cd8..be8b493d 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -29,7 +29,7 @@ read_globals = { "drawers", "mg", "craftguide", "i3", "mtt", "vizlib", "mcl_sounds", "mcl_vars", - "mcl_worlds", + "mcl_worlds", "exchangeclone", -- Only used in technic/machines/MV/lighting.lua (disabled) "isprotect", "homedecor_expect_infinite_stacks", diff --git a/technic/machines/register/recipes.lua b/technic/machines/register/recipes.lua index af79f449..17c83a68 100644 --- a/technic/machines/register/recipes.lua +++ b/technic/machines/register/recipes.lua @@ -96,7 +96,14 @@ local function register_recipe(typename, data) end end +-- Checks for "zzzz_exchangeclone_crafthook" mod so that it won't crash with older versions of ExchangeClone +-- which don't have it. +local has_exchangeclone = minetest.get_modpath("zzzz_exchangeclone_init") + function technic.register_recipe(typename, data) + if has_exchangeclone then + exchangeclone.register_technic_recipe(typename, data) + end minetest.after(0.01, register_recipe, typename, data) -- Handle aliases end diff --git a/technic/mod.conf b/technic/mod.conf index 332e2589..90a9da9c 100644 --- a/technic/mod.conf +++ b/technic/mod.conf @@ -1,3 +1,3 @@ name = technic depends = default, pipeworks, technic_worldgen, basic_materials, moreores -optional_depends = bucket, mesecons, mesecons_mvps, digilines, digiline_remote, unified_inventory, dye, craftguide, i3, mtt, vizlib +optional_depends = bucket, mesecons, mesecons_mvps, digilines, digiline_remote, unified_inventory, dye, craftguide, i3, mtt, vizlib, zzzz_exchangeclone_init