forked from Sokomine/yl_speak_up
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
|
end
|
||||||
|
|
||||||
-- has the player the right privs?
|
-- 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)
|
yl_speak_up.may_edit_npc = function(player, n_id)
|
||||||
if(not(player)) then
|
if(not(player)) then
|
||||||
return false
|
return false
|
||||||
@ -3498,5 +3499,6 @@ yl_speak_up.may_edit_npc = function(player, n_id)
|
|||||||
-- is the player allowed to edit this npc?
|
-- is the player allowed to edit this npc?
|
||||||
return (yl_speak_up.npc_owner[ n_id ] == pname
|
return (yl_speak_up.npc_owner[ n_id ] == pname
|
||||||
and minetest.check_player_privs(player, {npc_talk_owner=true})
|
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}))
|
or minetest.check_player_privs(player, {npc_master=true}))
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user