forked from minetest-mods/technic
		
	@@ -159,6 +159,16 @@ local function get_receive_fields(name, data)
 | 
			
		||||
	return function(pos, formname, fields, sender)
 | 
			
		||||
		local meta = minetest.get_meta(pos)
 | 
			
		||||
		local page = "main"
 | 
			
		||||
 | 
			
		||||
		local owner = meta:get_string("owner")
 | 
			
		||||
		if owner ~= "" then
 | 
			
		||||
			-- prevent modification of locked chests
 | 
			
		||||
			if owner ~= sender:get_player_name() then return end
 | 
			
		||||
		elseif not fields.quit then
 | 
			
		||||
			-- prevent modification of protected chests
 | 
			
		||||
			if minetest.is_protected(pos, sender:get_player_name()) then return end
 | 
			
		||||
		end
 | 
			
		||||
 | 
			
		||||
		if fields.sort or (data.autosort and fields.quit and meta:get_int("autosort") == 1) then
 | 
			
		||||
			sort_inventory(meta:get_inventory())
 | 
			
		||||
		end
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user