From b2e5c81e4d61395561116fed197310daac880c69 Mon Sep 17 00:00:00 2001 From: wsor4035 <24964441+wsor4035@users.noreply.github.com> Date: Sun, 8 Sep 2024 19:26:36 -0400 Subject: [PATCH] switch over to using xcompats function --- homedecor_common/inventory.lua | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/homedecor_common/inventory.lua b/homedecor_common/inventory.lua index d25b7fa3..614e0eef 100644 --- a/homedecor_common/inventory.lua +++ b/homedecor_common/inventory.lua @@ -12,22 +12,7 @@ local default_can_dig = function(pos,player) return meta:get_inventory():is_empty("main") end -local default_can_interact_with_node = function(player, pos) - --if we have default, use it - if default then return default.can_interact_with_node(player, pos) end - - local owner = minetest.get_meta(pos):get_string("owner") or "" - - --check that we have a valid player - if not player or not player:is_player() then return false end - --check there privs for compat with areas - if minetest.check_player_privs(player, "protection_bypass") then return true end - --if a normal player, check if they are the owner - if owner == "" or owner == player:get_player_name() then return true end - - return false -end - +local default_can_interact_with_node = xcompat.functions.can_interact_with_node local default_inventory_formspecs = { ["4"]="size[8,6]"..