Skip to content

Commit

Permalink
Add ExchangeClone support. (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePython10110 authored Jan 6, 2024
1 parent f1b9928 commit 8264761
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions technic/machines/register/recipes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion technic/mod.conf
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8264761

Please sign in to comment.