diff --git a/.luacheckrc b/.luacheckrc index a89bc33..22986f3 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -25,5 +25,6 @@ read_globals = { "screwdriver", "intllib", "digilines", - "mesecon" + "mesecon", + "techage" } diff --git a/lua/controller.lua b/lua/controller.lua index 24d0e81..7dc7027 100644 --- a/lua/controller.lua +++ b/lua/controller.lua @@ -47,6 +47,7 @@ local default_loaded = core.get_modpath("default") and default local mcl_loaded = core.get_modpath("mcl_core") and mcl_core local pipeworks_loaded = core.get_modpath("pipeworks") and pipeworks local digilines_loaded = core.get_modpath("digilines") and digilines +local techage_loaded = core.get_modpath("techage") and techage local function controller_formspec(pos) local formspec = @@ -500,6 +501,14 @@ local function register_controller() end core.register_node("drawers:controller", def) + + if techage_loaded then + techage.register_node({"drawers:controller"}, { + on_push_item = function(pos, in_dir, stack) + return controller_insert_to_drawers(pos, stack) + end + }) + end end -- register drawer controller diff --git a/mod.conf b/mod.conf index bc465bc..b61d450 100644 --- a/mod.conf +++ b/mod.conf @@ -1,4 +1,4 @@ name = drawers description = Storage Drawers - A Mod adding simple storages for items and blocks, showing the item's inventory image in the front. -optional_depends = default, mcl_core, screwdriver, pipeworks, intllib, moreores, digilines, mesecons_mvps +optional_depends = default, mcl_core, screwdriver, pipeworks, intllib, moreores, digilines, mesecons_mvps, techage min_minetest_version = 5.0