added npc_talk_master
This commit is contained in:
		
							parent
							
								
									c271a3480e
								
							
						
					
					
						commit
						17b4ed455c
					
				@ -3490,6 +3490,7 @@ yl_speak_up.set_muted = function(p_name, obj, set_muted)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
-- has the player the right privs?
 | 
			
		||||
-- this is used for the "I am your master" talk based configuration; *NOT* for the staffs!
 | 
			
		||||
yl_speak_up.may_edit_npc = function(player, n_id)
 | 
			
		||||
	if(not(player)) then
 | 
			
		||||
		return false
 | 
			
		||||
@ -3498,5 +3499,6 @@ yl_speak_up.may_edit_npc = function(player, n_id)
 | 
			
		||||
	-- is the player allowed to edit this npc?
 | 
			
		||||
	return (yl_speak_up.npc_owner[ n_id ] == pname
 | 
			
		||||
	  and minetest.check_player_privs(player, {npc_talk_owner=true})
 | 
			
		||||
	  or minetest.check_player_privs(player, {npc_talk_master=true})
 | 
			
		||||
	  or minetest.check_player_privs(player, {npc_master=true}))
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user