diff --git a/mods/ITEMS/mcl_chests/init.lua b/mods/ITEMS/mcl_chests/init.lua index b9fde03f9a..bc3c6af047 100644 --- a/mods/ITEMS/mcl_chests/init.lua +++ b/mods/ITEMS/mcl_chests/init.lua @@ -1,3 +1,9 @@ +local no_rotate, simple_rotate +if minetest.get_modpath("screwdriver") then + no_rotate = screwdriver.disallow + simple_rotate = screwdriver.rotate_simple +end + -- This is a helper function to register both chests and trapped chests. Trapped chests will make use of the additional parameters local register_chest = function(basename, desc, longdesc, usagehelp, hidden, mesecons, on_rightclick_addendum, on_rightclick_addendum_left, on_rightclick_addendum_right, drop) @@ -7,12 +13,6 @@ else drop = "mcl_chests:"..drop end -local no_rotate, simple_rotate -if minetest.get_modpath("screwdriver") then - no_rotate = screwdriver.disallow - simple_rotate = screwdriver.rotate_simple -end - minetest.register_node("mcl_chests:"..basename, { description = desc, _doc_items_longdesc = longdesc,