mirror of
				https://github.com/mt-mods/homedecor_modpack.git
				synced 2025-11-04 10:55:31 +01:00 
			
		
		
		
	switch over to using xcompats function
This commit is contained in:
		@@ -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]"..
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user